diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..257d421 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "csharpier": { + "version": "1.0.3", + "commands": [ + "csharpier" + ], + "rollForward": false + } + } +} \ No newline at end of file diff --git a/.csharpierrc b/.csharpierrc new file mode 100644 index 0000000..c295ad9 --- /dev/null +++ b/.csharpierrc @@ -0,0 +1,10 @@ +{ + "printWidth": 110, + "useTabs": false, + "tabWidth": 4, + "preprocessorSymbolSets": [ + "", + "DEBUG", + "DEBUG,CODE_STYLE" + ] +} diff --git a/.editorconfig b/.editorconfig index d9f8b09..44e1550 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,8 +15,25 @@ indent_size = 4 indent_style = space # New line preferences -end_of_line = unset +end_of_line = crlf insert_final_newline = false +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion +dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion +dotnet_style_namespace_match_folder = true:suggestion #### Build files #### @@ -50,10 +67,10 @@ file_header_template = This Source Code Form is subject to the terms of the MIT #### .NET Coding Conventions #### # this. and Me. preferences -dotnet_style_qualification_for_event = false:warning -dotnet_style_qualification_for_field = true:warning -dotnet_style_qualification_for_method = false:warning -dotnet_style_qualification_for_property = false:warning +dotnet_style_qualification_for_event = false:none +dotnet_style_qualification_for_field = false:none +dotnet_style_qualification_for_method = false:none +dotnet_style_qualification_for_property = false:none # Language keywords vs BCL types preferences dotnet_style_predefined_type_for_locals_parameters_members = true:warning @@ -99,13 +116,13 @@ csharp_style_var_for_built_in_types = false:warning csharp_style_var_when_type_is_apparent = false:warning # Expression-bodied members -csharp_style_expression_bodied_accessors = false:silent +csharp_style_expression_bodied_accessors = true:silent csharp_style_expression_bodied_constructors = false:silent -csharp_style_expression_bodied_indexers = false:silent +csharp_style_expression_bodied_indexers = true:silent csharp_style_expression_bodied_lambdas = true:silent csharp_style_expression_bodied_methods = false:silent csharp_style_expression_bodied_operators = false:silent -csharp_style_expression_bodied_properties = false:silent +csharp_style_expression_bodied_properties = true:silent # Pattern matching preferences csharp_style_prefer_pattern_matching = true:suggestion @@ -119,9 +136,9 @@ csharp_style_conditional_delegate_call = true:suggestion csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async # Code-block preferences -csharp_prefer_braces = true:suggestion -csharp_using_directive_placement = outside_namespace:warning -csharp_style_namespace_declarations = file_scoped:warning +csharp_prefer_braces = true:silent +csharp_using_directive_placement = outside_namespace:silent +csharp_style_namespace_declarations = block_scoped:silent csharp_style_unused_value_assignment_preference = discard_variable:none csharp_style_unused_value_expression_statement_preference = discard_variable:none csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:warning @@ -147,7 +164,7 @@ csharp_indent_block_contents = true csharp_indent_braces = false csharp_indent_case_contents = true csharp_indent_case_contents_when_block = false -csharp_indent_labels = no_change +csharp_indent_labels = one_less_than_current csharp_indent_switch_labels = true # Space preferences @@ -387,3 +404,10 @@ dotnet_diagnostic.SA1629.severity = none dotnet_diagnostic.SA1633.severity = none dotnet_diagnostic.SA1634.severity = none dotnet_diagnostic.SA1652.severity = none +csharp_prefer_simple_using_statement = true:suggestion +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_prefer_system_threading_lock = true:suggestion +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_prefer_null_check_over_type_check = true:suggestion diff --git a/.github/funding.yml b/.github/funding.yml index 249b02c..41fafec 100644 --- a/.github/funding.yml +++ b/.github/funding.yml @@ -1 +1 @@ -github: [lepoco] +github: [pomianowski] diff --git a/Directory.Build.props b/Directory.Build.props index e4d09a4..0cfe808 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,15 +1,14 @@ - $(MSBuildThisFileDirectory) $(RepositoryDirectory)build\ - 1.0.0 - 1.0.0-preview.3 + $(Version) + $(Version)-preview.7 + net9.0 - lepo.co lepo.co @@ -23,23 +22,19 @@ Icon.png https://github.com/lepoco/openapi.client/main/build/nuget.png - true moderate true false - true - true - 12.0 + 13.0 enable - $(NoWarn);CS8500 - $(MSBuildProjectName.Contains('Test')) False True - true true $(TF_BUILD) - @@ -75,15 +67,6 @@ - - - - - all - build; analyzers - - - @@ -99,5 +82,4 @@ - diff --git a/Directory.Build.targets b/Directory.Build.targets index f9136a8..1119032 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,37 +1,34 @@ - $(Product) Asset - $(CommonTags);.NET $(CommonTags);$(PackageTags) $(CommonTags) - - - + <_Parameter1>CommitHash <_Parameter2>$(SourceRevisionId) - NETSTANDARD2_1_OR_GREATER - true @@ -39,7 +36,6 @@ true true - - $(IntermediateOutputPath)$(MSBuildProjectName).SkipLocalsInit.g.cs + $(IntermediateOutputPath)$(MSBuildProjectName).SkipLocalsInit.g.cs @@ -63,17 +61,21 @@ [module: global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]]]> - - - + - - + diff --git a/Directory.Packages.props b/Directory.Packages.props index 77d3ad0..0bf6e36 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,26 +1,31 @@ - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/OpenApi.Client.sln b/OpenApi.Client.sln index b90502b..204e21f 100644 --- a/OpenApi.Client.sln +++ b/OpenApi.Client.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.002.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenApi.Client", "src\OpenApi.Client\OpenApi.Client.csproj", "{3FBC6663-B59A-4A68-A129-10A97ABE66BC}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D8B6F9EF-D1AA-4331-804E-39C224975632}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig @@ -17,17 +15,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ThirdPartyNotices.txt = ThirdPartyNotices.txt EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenApi.Client.SourceGenerators.Roslyn401", "src\OpenApi.Client.SourceGenerators.Roslyn401\OpenApi.Client.SourceGenerators.Roslyn401.csproj", "{7A1D6A44-DD20-4AD1-95DB-C98F1C0DEA60}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{723E5DFE-E809-4C07-90CC-03F44C29E259}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenApi.Client.SourceGenerators.Roslyn431", "src\OpenApi.Client.SourceGenerators.Roslyn431\OpenApi.Client.SourceGenerators.Roslyn431.csproj", "{BAC41EE8-5516-4D6C-ABBC-1F66CB7ABEC3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenApi.Client", "src\OpenApi.Client\OpenApi.Client.csproj", "{3FBC6663-B59A-4A68-A129-10A97ABE66BC}" EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "OpenApi.Client.SourceGenerators", "src\OpenApi.Client.SourceGenerators\OpenApi.Client.SourceGenerators.shproj", "{5E7F1212-A54B-40CA-98C5-1FF5CD1A1638}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenApi.Client.Cli", "src\OpenApi.Client.Cli\OpenApi.Client.Cli.csproj", "{4D8AFE01-AD96-4954-8959-1002A3E20774}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{723E5DFE-E809-4C07-90CC-03F44C29E259}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenApi.Client.SourceGenerators", "src\OpenApi.Client.SourceGenerators\OpenApi.Client.SourceGenerators.csproj", "{D50490C8-488C-7AC3-5A43-9F8BEB6CD044}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenApi.Client.SourceGenerators.Roslyn431.UnitTests", "tests\OpenApi.Client.SourceGenerators.Roslyn431.UnitTests\OpenApi.Client.SourceGenerators.Roslyn431.UnitTests.csproj", "{6F7B2036-2C02-4C10-A788-613B116BE246}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenApi.Client.SourceGenerators.UnitTests", "tests\OpenApi.Client.SourceGenerators.UnitTests\OpenApi.Client.SourceGenerators.UnitTests.csproj", "{07D95FF8-531B-5237-7018-C39645124B17}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenApi.Client.Cli", "src\OpenApi.Client.Cli\OpenApi.Client.Cli.csproj", "{4D8AFE01-AD96-4954-8959-1002A3E20774}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenApi.Client.Cli.UnitTests", "tests\OpenApi.Client.Cli.UnitTests\OpenApi.Client.Cli.UnitTests.csproj", "{0C407F0F-BE50-4850-B695-FE1C0910E8BB}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -39,36 +37,34 @@ Global {3FBC6663-B59A-4A68-A129-10A97ABE66BC}.Debug|Any CPU.Build.0 = Debug|Any CPU {3FBC6663-B59A-4A68-A129-10A97ABE66BC}.Release|Any CPU.ActiveCfg = Release|Any CPU {3FBC6663-B59A-4A68-A129-10A97ABE66BC}.Release|Any CPU.Build.0 = Release|Any CPU - {7A1D6A44-DD20-4AD1-95DB-C98F1C0DEA60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7A1D6A44-DD20-4AD1-95DB-C98F1C0DEA60}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7A1D6A44-DD20-4AD1-95DB-C98F1C0DEA60}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7A1D6A44-DD20-4AD1-95DB-C98F1C0DEA60}.Release|Any CPU.Build.0 = Release|Any CPU - {BAC41EE8-5516-4D6C-ABBC-1F66CB7ABEC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BAC41EE8-5516-4D6C-ABBC-1F66CB7ABEC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BAC41EE8-5516-4D6C-ABBC-1F66CB7ABEC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BAC41EE8-5516-4D6C-ABBC-1F66CB7ABEC3}.Release|Any CPU.Build.0 = Release|Any CPU - {6F7B2036-2C02-4C10-A788-613B116BE246}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F7B2036-2C02-4C10-A788-613B116BE246}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F7B2036-2C02-4C10-A788-613B116BE246}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F7B2036-2C02-4C10-A788-613B116BE246}.Release|Any CPU.Build.0 = Release|Any CPU {4D8AFE01-AD96-4954-8959-1002A3E20774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4D8AFE01-AD96-4954-8959-1002A3E20774}.Debug|Any CPU.Build.0 = Debug|Any CPU {4D8AFE01-AD96-4954-8959-1002A3E20774}.Release|Any CPU.ActiveCfg = Release|Any CPU {4D8AFE01-AD96-4954-8959-1002A3E20774}.Release|Any CPU.Build.0 = Release|Any CPU + {D50490C8-488C-7AC3-5A43-9F8BEB6CD044}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D50490C8-488C-7AC3-5A43-9F8BEB6CD044}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D50490C8-488C-7AC3-5A43-9F8BEB6CD044}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D50490C8-488C-7AC3-5A43-9F8BEB6CD044}.Release|Any CPU.Build.0 = Release|Any CPU + {07D95FF8-531B-5237-7018-C39645124B17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07D95FF8-531B-5237-7018-C39645124B17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07D95FF8-531B-5237-7018-C39645124B17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07D95FF8-531B-5237-7018-C39645124B17}.Release|Any CPU.Build.0 = Release|Any CPU + {0C407F0F-BE50-4850-B695-FE1C0910E8BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0C407F0F-BE50-4850-B695-FE1C0910E8BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0C407F0F-BE50-4850-B695-FE1C0910E8BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0C407F0F-BE50-4850-B695-FE1C0910E8BB}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {6F7B2036-2C02-4C10-A788-613B116BE246} = {723E5DFE-E809-4C07-90CC-03F44C29E259} + {07D95FF8-531B-5237-7018-C39645124B17} = {723E5DFE-E809-4C07-90CC-03F44C29E259} + {0C407F0F-BE50-4850-B695-FE1C0910E8BB} = {723E5DFE-E809-4C07-90CC-03F44C29E259} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5A90450F-432E-450C-9FE7-4C820639466E} EndGlobalSection GlobalSection(SharedMSBuildProjectFiles) = preSolution src\OpenApi.Client.SourceGenerators\OpenApi.Client.SourceGenerators.projitems*{4d8afe01-ad96-4954-8959-1002a3e20774}*SharedItemsImports = 5 - src\OpenApi.Client.SourceGenerators\OpenApi.Client.SourceGenerators.projitems*{5e7f1212-a54b-40ca-98c5-1ff5cd1a1638}*SharedItemsImports = 13 - src\OpenApi.Client.SourceGenerators\OpenApi.Client.SourceGenerators.projitems*{7a1d6a44-dd20-4ad1-95db-c98f1c0dea60}*SharedItemsImports = 5 - src\OpenApi.Client.SourceGenerators\OpenApi.Client.SourceGenerators.projitems*{bac41ee8-5516-4d6c-abbc-1f66cb7abec3}*SharedItemsImports = 5 EndGlobalSection EndGlobal diff --git a/README.md b/README.md index 1cd8035..fe62dfd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ☄️ OpenAPI Client -[Created with ❤ in Poland by lepo.co](https://dev.lepo.co/) +[Created with ❤ in Poland by lepo.co](https://lepo.co/) and [wonderful open-source community](https://github.com/lepoco/openapi.client/graphs/contributors) OpenAPI Client is a toolkit that helps you create HTTP clients for external APIs based on their OpenAPI specifications. It simplifies the process of consuming and interacting with various web services. The project is developed and maintained by lepo.co and other community contributors. ## 👀 What does this repo contain? @@ -10,7 +10,7 @@ The repository contains NuGet package source code, which uses C# code generators ## Gettings started OpenApiClient is available as NuGet package on NuGet.org: -https://www.nuget.org/packages/OpenApiClient + You can add it to your project using .NET CLI: @@ -30,7 +30,7 @@ NuGet\Install-Package OpenApiClient dotnet tool install --global OpenApiClient.Cli ``` -Define an Open API file as content in your **.csproj** file. +Define an Open API file as content in your **.csproj** file. ```xml @@ -80,12 +80,12 @@ We found the use of nullable essential, so C# 8.0 is required. ## OpenAPI OpenAPI specification is available at: -https://github.com/OAI/OpenAPI-Specification + ## Community Toolkit The OpenAPI Client is inspired by the MVVM Community Toolkit: -https://github.com/CommunityToolkit/dotnet + ## Compilation diff --git a/documentation/OAPIC007.md b/documentation/OAPIC007.md new file mode 100644 index 0000000..cbd4cca --- /dev/null +++ b/documentation/OAPIC007.md @@ -0,0 +1,7 @@ +# OAPIC006 + +OpenApi.Client.SourceGenerators.MissingPaths + +## Cause + +Source generation from Open API document failed because there is no known paths to generate. diff --git a/nuget.config b/nuget.config index 6eca12a..97513c8 100644 --- a/nuget.config +++ b/nuget.config @@ -4,11 +4,9 @@ - - diff --git a/src/OpenApi.Client.Cli/Commands/GenerateCommand.cs b/src/OpenApi.Client.Cli/Commands/GenerateCommand.cs index bdd551b..0cda1c9 100644 --- a/src/OpenApi.Client.Cli/Commands/GenerateCommand.cs +++ b/src/OpenApi.Client.Cli/Commands/GenerateCommand.cs @@ -3,12 +3,8 @@ // Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. // All Rights Reserved. -using Microsoft.CodeAnalysis; using OpenApi.Client.Cli.Settings; -using OpenApi.Client.SourceGenerators.Contracts; -using OpenApi.Client.SourceGenerators.Generation; -using OpenApi.Client.SourceGenerators.Schema; -using OpenApi.Client.SourceGenerators.Serialization; +using OpenApi.Client.SourceGenerators.Client; namespace OpenApi.Client.Cli.Commands; @@ -24,100 +20,69 @@ public sealed class GenerateCommand : AsyncCommand { private static readonly Regex PathNormalizer = new(@"(\\\\|//)", RegexOptions.Compiled); - private static readonly Regex NamespaceValidator = - new(@"^[_a-zA-Z][_a-zA-Z0-9]*(\.[_a-zA-Z][_a-zA-Z0-9]*)*$", RegexOptions.Compiled); + private static readonly Regex NamespaceValidator = new( + @"^[_a-zA-Z][_a-zA-Z0-9]*(\.[_a-zA-Z][_a-zA-Z0-9]*)*$", + RegexOptions.Compiled + ); - private static readonly Regex ClassNameValidator = - new(@"^[_a-zA-Z][_a-zA-Z0-9]*$", RegexOptions.Compiled); + private static readonly Regex ClassNameValidator = new( + @"^[_a-zA-Z][_a-zA-Z0-9]*$", + RegexOptions.Compiled + ); /// - public override async Task ExecuteAsync( - CommandContext context, - GenerateCommandSettings settings - ) + public override async Task ExecuteAsync(CommandContext context, GenerateCommandSettings settings) { using CancellationTokenSource cancellationTokenSource = new(); - string contents = await File.ReadAllTextAsync(settings.File); - SerializationResult? serializationResult = - new OpenApiSerializer().Deserialize(settings.File, contents); + await using FileStream fileStream = new(settings.File, FileMode.Open, FileAccess.Read); - if (serializationResult.HasErrors) - { - foreach ( - SerializationResultError serializationResultError in serializationResult.Errors - ) + ClientGenerator generator = new( + new GeneratorData { - AnsiConsole.MarkupLine($"[red]Error: {serializationResultError.Message}[/]"); + NamespaceName = settings.Namespace, + ClassName = settings.ClassName, + Access = Accessibility.Public, + SerializationTool = SerializationTool.SystemTextJson, + Source = fileStream, + Templates = null, } - - return -1; - } - - if (serializationResult.Result is null) - { - AnsiConsole.MarkupLine($"[red]Error: Serialized JSON returned empty API.[/]"); - - return -2; - } - - string? generatedSource = null; - - OpenApiContract contract = OpenApiContractParser.Parse( - settings.Namespace, - settings.ClassName, - Accessibility.Public, - serializationResult.Result ); - ClientGenerator generator = - new( - contract, - settings.Serializer switch - { - JsonSerializerType.NewtonsoftJson => ClientGeneratorSerializer.NewtonsoftJson, - _ => ClientGeneratorSerializer.SystemTextJson - } - ); - GenerationResult generatorResult = generator.Generate(); + GenerationResult generatorResult = await generator.GenerateAsync(cancellationTokenSource.Token); if (generatorResult.HasErrors) { - foreach (GenerationResultError generatorResultError in generatorResult.Errors) + foreach (GenerationError generatorResultError in generatorResult.Errors) { - AnsiConsole.MarkupLine($"[red]Error: {generatorResultError.Message}[/]"); + AnsiConsole.MarkupLine($"[red]Error:[/] {generatorResultError.Message}"); } return -3; } - generatedSource = generatorResult.Result; - try { await File.WriteAllTextAsync( settings.Output, - generatedSource, + generatorResult.GeneratedClient, cancellationTokenSource.Token ); } catch (Exception e) { - AnsiConsole.MarkupLine($"[red]Error: {e.Message}[/]"); + AnsiConsole.MarkupLine($"[red]Error:[/] {e.Message}"); return -4; } - AnsiConsole.MarkupLine($"[green]Success: File was properly saved to {settings.Output}.[/]"); + AnsiConsole.MarkupLine($"[green]Success:[/] File was properly saved to {settings.Output}."); return 0; } /// - public override ValidationResult Validate( - CommandContext context, - GenerateCommandSettings settings - ) + public override ValidationResult Validate(CommandContext context, GenerateCommandSettings settings) { if (string.IsNullOrEmpty(settings.ClassName)) { @@ -128,18 +93,14 @@ GenerateCommandSettings settings if (!ClassNameValidator.IsMatch(settings.ClassName)) { - return ValidationResult.Error( - $"The name '{settings.ClassName}' is not valid C# type name." - ); + return ValidationResult.Error($"The name '{settings.ClassName}' is not valid C# type name."); } settings.Namespace = settings.Namespace.Trim(); if (!NamespaceValidator.IsMatch(settings.Namespace)) { - return ValidationResult.Error( - $"The namespace '{settings.Namespace}' is not valid C# namespace." - ); + return ValidationResult.Error($"The namespace '{settings.Namespace}' is not valid C# namespace."); } settings.File = PathNormalizer.Replace(settings.File, "/"); diff --git a/src/OpenApi.Client.Cli/DependencyInjection/DependencyInjectionRegistrar.cs b/src/OpenApi.Client.Cli/DependencyInjection/DependencyInjectionRegistrar.cs deleted file mode 100644 index 016fd21..0000000 --- a/src/OpenApi.Client.Cli/DependencyInjection/DependencyInjectionRegistrar.cs +++ /dev/null @@ -1,34 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.Cli.DependencyInjection; - -internal sealed class DependencyInjectionRegistrar(IHostBuilder builder) : ITypeRegistrar -{ - public ITypeResolver Build() - { - return new DependencyInjectionResolver(builder.Build()); - } - - public void Register(Type service, Type implementation) - { - builder.ConfigureServices((_, services) => services.AddSingleton(service, implementation)); - } - - public void RegisterInstance(Type service, object implementation) - { - builder.ConfigureServices((_, services) => services.AddSingleton(service, implementation)); - } - - public void RegisterLazy(Type service, Func func) - { - if (func is null) - { - throw new ArgumentNullException(nameof(func)); - } - - builder.ConfigureServices((_, services) => services.AddSingleton(service, _ => func())); - } -} diff --git a/src/OpenApi.Client.Cli/DependencyInjection/DependencyInjectionResolver.cs b/src/OpenApi.Client.Cli/DependencyInjection/DependencyInjectionResolver.cs deleted file mode 100644 index 283ba8d..0000000 --- a/src/OpenApi.Client.Cli/DependencyInjection/DependencyInjectionResolver.cs +++ /dev/null @@ -1,19 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.Cli.DependencyInjection; - -internal sealed class DependencyInjectionResolver(IHost host) : ITypeResolver, IDisposable -{ - public object? Resolve(Type? type) - { - return type != null ? host.Services.GetService(type) : null; - } - - public void Dispose() - { - host.Dispose(); - } -} diff --git a/src/OpenApi.Client.Cli/GlobalUsings.cs b/src/OpenApi.Client.Cli/GlobalUsings.cs index dd223da..3b02011 100644 --- a/src/OpenApi.Client.Cli/GlobalUsings.cs +++ b/src/OpenApi.Client.Cli/GlobalUsings.cs @@ -3,10 +3,14 @@ // Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. // All Rights Reserved. +global using System; global using System.ComponentModel; +global using System.IO; global using System.Text.RegularExpressions; +global using System.Threading; global using System.Threading.Tasks; -global using Microsoft.Extensions.DependencyInjection; -global using Microsoft.Extensions.Hosting; +global using Microsoft.CodeAnalysis; +global using Microsoft.OpenApi; +global using Microsoft.OpenApi.Reader; global using Spectre.Console; global using Spectre.Console.Cli; diff --git a/src/OpenApi.Client.Cli/OpenApi.Client.Cli.csproj b/src/OpenApi.Client.Cli/OpenApi.Client.Cli.csproj index d5f6234..25bd193 100644 --- a/src/OpenApi.Client.Cli/OpenApi.Client.Cli.csproj +++ b/src/OpenApi.Client.Cli/OpenApi.Client.Cli.csproj @@ -1,9 +1,8 @@ - openapiclient OpenApiClient.Cli - net8.0 + $(CommonTargetFramework) exe true openapiclient @@ -11,19 +10,19 @@ $(CommonTags);cli;command;tool Your friendly neighborhood tool for generating C# client classes from Open API jsons! - - - + + - + + @@ -32,5 +31,7 @@ - + + + diff --git a/src/OpenApi.Client.Cli/Program.cs b/src/OpenApi.Client.Cli/Program.cs index d3f428a..f119a4a 100644 --- a/src/OpenApi.Client.Cli/Program.cs +++ b/src/OpenApi.Client.Cli/Program.cs @@ -4,12 +4,8 @@ // All Rights Reserved. using OpenApi.Client.Cli.Commands; -using OpenApi.Client.Cli.DependencyInjection; -IHostBuilder builder = Host.CreateDefaultBuilder(args); -DependencyInjectionRegistrar registrar = new(builder); - -CommandApp app = new(registrar); +CommandApp app = new(); app.Configure(config => { @@ -24,3 +20,11 @@ }); await app.RunAsync(args); + +return; + +// Public partial declaration of a class for integration tests +namespace OpenApi.Client.Cli +{ + public partial class Program; +} diff --git a/src/OpenApi.Client.Cli/Properties/launchSettings.json b/src/OpenApi.Client.Cli/Properties/launchSettings.json index c5a014e..85b24e9 100644 --- a/src/OpenApi.Client.Cli/Properties/launchSettings.json +++ b/src/OpenApi.Client.Cli/Properties/launchSettings.json @@ -3,7 +3,7 @@ "OpenApiClient.Cli [Test]": { "commandName": "Project", "workingDirectory": "$(ProjectDir)", - "commandLineArgs": "generate ..\\..\\tests\\OpenApi.Client.SourceGenerators.Roslyn431.UnitTests\\OpenApis\\openapi-3.0.1.extended.json --output bin\\UsersClient.cs --namespace Clients.Users --classname UsersClient" + "commandLineArgs": "generate ..\\..\\tests\\OpenApi.Client.SourceGenerators.UnitTests\\OpenApis\\openapi-3.0.1.extended.json --output bin\\UsersClient.cs --namespace Clients.Users --classname UsersClient" } } } \ No newline at end of file diff --git a/src/OpenApi.Client.Cli/Settings/JsonSerializerType.cs b/src/OpenApi.Client.Cli/Settings/JsonSerializerType.cs index 81d3190..f7dd5ab 100644 --- a/src/OpenApi.Client.Cli/Settings/JsonSerializerType.cs +++ b/src/OpenApi.Client.Cli/Settings/JsonSerializerType.cs @@ -23,5 +23,5 @@ public enum JsonSerializerType /// /// Represents the Newtonsoft.Json serializer. /// - NewtonsoftJson + NewtonsoftJson, } diff --git a/src/OpenApi.Client.SourceGenerators.Roslyn401/OpenApi.Client.SourceGenerators.Roslyn401.csproj b/src/OpenApi.Client.SourceGenerators.Roslyn401/OpenApi.Client.SourceGenerators.Roslyn401.csproj deleted file mode 100644 index 1d9f600..0000000 --- a/src/OpenApi.Client.SourceGenerators.Roslyn401/OpenApi.Client.SourceGenerators.Roslyn401.csproj +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/OpenApi.Client.SourceGenerators.Roslyn431/OpenApi.Client.SourceGenerators.Roslyn431.csproj b/src/OpenApi.Client.SourceGenerators.Roslyn431/OpenApi.Client.SourceGenerators.Roslyn431.csproj deleted file mode 100644 index 1d9f600..0000000 --- a/src/OpenApi.Client.SourceGenerators.Roslyn431/OpenApi.Client.SourceGenerators.Roslyn431.csproj +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/OpenApi.Client.SourceGenerators/AnalyzerReleases.Shipped.md b/src/OpenApi.Client.SourceGenerators/AnalyzerReleases.Shipped.md index 601aadd..e23efa4 100644 --- a/src/OpenApi.Client.SourceGenerators/AnalyzerReleases.Shipped.md +++ b/src/OpenApi.Client.SourceGenerators/AnalyzerReleases.Shipped.md @@ -1,15 +1,13 @@ -; Shipped analyzer releases -; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md - ## Release 1.0 ### New Rules -| Rule ID | Category | Severity | Notes | -| -------- | ------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------- | -| OAPIC001 | OpenApi.Client.SourceGenerators.DocumentMissing | Error | See [OAPIC001 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC001.md) | -| OAPIC002 | OpenApi.Client.SourceGenerators.DocumentEmpty | Error | See [OAPIC002 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC002.md) | -| OAPIC003 | OpenApi.Client.SourceGenerators.DocumentDeserializationFailed | Error | See [OAPIC003 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC003.md) | -| OAPIC004 | OpenApi.Client.SourceGenerators.GenerationFailed | Error | See [OAPIC004 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC004.md) | -| OAPIC005 | OpenApi.Client.SourceGenerators.GeneratedSourceEmpty | Error | See [OAPIC005 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC005.md) | -| OAPIC006 | OpenApi.Client.SourceGenerators.MissingPaths | Error | See [OAPIC006 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC006.md) | +Rule ID | Category | Severity | Notes +--------|----------|----------|------- +| OAPIC001 | OpenApi.Client.OutdatedRoslyn | Error | See [OAPIC001 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC001.md) | +| OAPIC002 | OpenApi.Client.SourceGenerators.DocumentMissing | Error | See [OAPIC002 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC002.md) | +| OAPIC003 | OpenApi.Client.SourceGenerators.DocumentEmpty | Error | See [OAPIC003 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC003.md) | +| OAPIC004 | OpenApi.Client.SourceGenerators.DocumentDeserializationFailed | Error | See [OAPIC004 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC004.md) | +| OAPIC005 | OpenApi.Client.SourceGenerators.GenerationFailed | Error | See [OAPIC005 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC005.md) | +| OAPIC006 | OpenApi.Client.SourceGenerators.GeneratedSourceEmpty | Error | See [OAPIC006 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC006.md) | +| OAPIC007 | OpenApi.Client.SourceGenerators.MissingPaths | Error | See [OAPIC007 Documentation](https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC007.md) | diff --git a/src/OpenApi.Client.SourceGenerators/Client/ClientGenerator.cs b/src/OpenApi.Client.SourceGenerators/Client/ClientGenerator.cs new file mode 100644 index 0000000..5d08861 --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/Client/ClientGenerator.cs @@ -0,0 +1,521 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +using Microsoft.OpenApi; +using Microsoft.OpenApi.Reader; +using OpenApi.Client.SourceGenerators.Converters; +using OpenApi.Client.SourceGenerators.Readers; +using OpenApi.Client.SourceGenerators.Reflection; + +namespace OpenApi.Client.SourceGenerators.Client; + +/// +/// Generates a C# client interface based on an OpenAPI document. +/// +public sealed class ClientGenerator(GeneratorData metadata) +{ + private readonly List errors = []; + + private OpenApiDocument document = null!; + + private static readonly string GeneratorVersion = AssemblyVersionProvider.Get(); + + private const string GeneratorName = OpenApiClientGeneration.GeneratorName; + + /// + /// Generates the client source code. + /// + /// The generated source code as a string. + public async Task GenerateAsync(CancellationToken cancellationToken = default) + { + OpenApiReaderSettings settings = CreateReaderSettings(); + ReadResult result; + + if (metadata.Source is not null) + { + result = await OpenApiModelFactory.LoadAsync( + input: metadata.Source, + format: null, + settings: settings, + cancellationToken: cancellationToken + ); + } + else if (metadata.Contents is not null) + { + result = OpenApiModelFactory.Parse(input: metadata.Contents, format: null, settings: settings); + } + else + { + errors.Add( + new GenerationError + { + Reason = GenerationErrorReason.DocumentDeserializationFailed, + Message = "No source or contents provided for OpenAPI document.", + } + ); + + return new GenerationResult { GeneratedClient = null, Errors = [.. errors] }; + } + + return CreateClientFromReadResult(result); + } + + public GenerationResult Generate() + { + OpenApiReaderSettings settings = CreateReaderSettings(); + ReadResult result; + + if (metadata.Contents is not null) + { + result = OpenApiModelFactory.Parse(input: metadata.Contents, format: null, settings: settings); + } + else + { + errors.Add( + new GenerationError + { + Reason = GenerationErrorReason.DocumentDeserializationFailed, + Message = "No source or contents provided for OpenAPI document.", + } + ); + + return new GenerationResult { GeneratedClient = null, Errors = [.. errors] }; + } + + return CreateClientFromReadResult(result); + } + + private static OpenApiReaderSettings CreateReaderSettings() + { + ValidationRuleSet ruleSet = ValidationRuleSet.GetDefaultRuleSet(); + + OpenApiReaderSettings settings = new() { LeaveStreamOpen = false, RuleSet = ruleSet }; + + settings.Readers.Remove(OpenApiConstants.Json); + settings.Readers.Add(OpenApiConstants.Json, new CustomOpenApiJsonReader()); + + return settings; + } + + private GenerationResult CreateClientFromReadResult(ReadResult result) + { + if (result.Diagnostic?.Errors.Count > 0) + { + foreach (OpenApiError? error in result.Diagnostic.Errors) + { + errors.Add( + new GenerationError + { + Reason = GenerationErrorReason.DocumentDeserializationFailed, + Message = error.Message, + } + ); + } + + return new GenerationResult { GeneratedClient = null, Errors = [.. errors] }; + } + + if (result.Document is null) + { + errors.Add( + new GenerationError + { + Reason = GenerationErrorReason.DocumentDeserializationFailed, + Message = "Failed to deserialize OpenAPI document.", + } + ); + + return new GenerationResult { GeneratedClient = null, Errors = [.. errors] }; + } + + document = result.Document; + + string client; + + try + { + client = ComputeClient(); + } + catch (Exception e) + { + errors.Add( + new GenerationError + { + Reason = GenerationErrorReason.ClientGenerationFailed, + Message = $"An error occurred while generating the client: {e.Message}", + } + ); + + return new GenerationResult { GeneratedClient = null, Errors = [.. errors] }; + } + + GenerationResult generationResult = new() { GeneratedClient = client, Errors = [.. errors] }; + + return generationResult; + } + + private string ComputeClient() + { + MemberDeclarationSyntax exceptionDeclaration = ComputeException(); + MemberDeclarationSyntax interfaceDeclaration = ComputeInterface(); + MemberDeclarationSyntax classDeclaration = ComputeClass(); + IEnumerable modelsDeclaration = ComputeModels(); + + NamespaceDeclarationSyntax namespaceDeclaration = SyntaxFactory + .NamespaceDeclaration(SyntaxFactory.ParseName(metadata.NamespaceName)) + .AddMembers([exceptionDeclaration, interfaceDeclaration, classDeclaration, .. modelsDeclaration]); + + CompilationUnitSyntax compilationUnit = SyntaxFactory + .CompilationUnit() + .AddMembers(namespaceDeclaration); + + // Add an empty line after OpenApiClientGeneration.Header + SyntaxTriviaList headerTrivia = SyntaxFactory.ParseLeadingTrivia(OpenApiClientGeneration.Header); + + compilationUnit = compilationUnit.WithLeadingTrivia(headerTrivia); + + string compilationResult = compilationUnit.NormalizeWhitespace().ToFullString(); + + return compilationResult; + } + + private MemberDeclarationSyntax ComputeException() + { + SyntaxTriviaList summaryTrivia = SyntaxFactory.TriviaList( + SyntaxFactory.Comment("/// "), + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.Comment( + $"/// {metadata.ClassName}Exception is an exception that is thrown when an error occurs in the {metadata.ClassName} client." + ), + SyntaxFactory.Comment("/// "), + SyntaxFactory.CarriageReturnLineFeed + ); + + return SyntaxFactory + .ClassDeclaration(metadata.ClassName + "Exception") + .AddModifiers(SyntaxFactory.Token(metadata.Access.ToSyntaxKind())) + .AddAttributeLists( + SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList(ComputeGeneratedAttribute())) + ) + .AddBaseListTypes( + SyntaxFactory.SimpleBaseType(SyntaxFactory.ParseTypeName("global::System.Exception")) + ) + .WithLeadingTrivia(summaryTrivia) + .WithTrailingTrivia(SyntaxFactory.CarriageReturnLineFeed, SyntaxFactory.CarriageReturnLineFeed); + } + + private MemberDeclarationSyntax ComputeInterface() + { + SyntaxTriviaList interfaceSummaryTrivia = SyntaxFactory.TriviaList( + SyntaxFactory.Comment("/// "), + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.Comment( + $"/// {metadata.ClassName} is an abstraction for a client to an API generated based on the OpenAPI specification." + ), + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.Comment( + "/// Uses an injected to make HTTP requests." + ), + SyntaxFactory.CarriageReturnLineFeed + ); + + if (!string.IsNullOrWhiteSpace(document.Info.Summary)) + { + interfaceSummaryTrivia = interfaceSummaryTrivia.AddRange( + [ + SyntaxFactory.Comment("/// "), + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.Comment( + $"/// {document.Info.Summary!.Replace("\r\n", " ").Replace("\n", " ")}" + ), + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.Comment("/// "), + ] + ); + } + + if (!string.IsNullOrWhiteSpace(document.Info.Description)) + { + interfaceSummaryTrivia = interfaceSummaryTrivia.AddRange( + [ + SyntaxFactory.Comment("/// "), + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.Comment( + $"/// {document.Info.Description!.Replace("\r\n", " ").Replace("\n", " ")}" + ), + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.Comment("/// "), + ] + ); + } + + interfaceSummaryTrivia = interfaceSummaryTrivia.Add(SyntaxFactory.Comment("/// ")); + + IEnumerable interfaceMembers = ComputeInterfaceMembers(); + + // Generate the interface with the updated summary + // Add GeneratedCodeAttribute to the interface + return SyntaxFactory + .InterfaceDeclaration('I' + metadata.ClassName) + .AddModifiers(SyntaxFactory.Token(metadata.Access.ToSyntaxKind())) + .AddAttributeLists( + SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList(ComputeGeneratedAttribute())) + ) + .WithLeadingTrivia(interfaceSummaryTrivia) + .AddMembers([.. interfaceMembers]) + .WithTrailingTrivia(SyntaxFactory.CarriageReturnLineFeed, SyntaxFactory.CarriageReturnLineFeed); + } + + private IEnumerable ComputeInterfaceMembers() + { + foreach (KeyValuePair openApiPath in document.Paths) + { + foreach ( + KeyValuePair openApiOperation in openApiPath.Value.Operations + ?? [] + ) + { + // TODO: Handle parameters, request bodies, and responses + IdentifierNameSyntax taskType = SyntaxFactory.IdentifierName( + "global::System.Threading.Tasks.Task" + ); + + SyntaxTriviaList summaryTrivia = SyntaxFactory.TriviaList( + SyntaxFactory.Comment("/// "), + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.Comment($"/// {openApiOperation.Value.Summary}"), + SyntaxFactory.CarriageReturnLineFeed + ); + + if (!string.IsNullOrEmpty(openApiOperation.Value.Description)) + { + summaryTrivia = summaryTrivia.AddRange( + [ + SyntaxFactory.Comment("/// "), + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.Comment($"/// {openApiOperation.Value.Description}"), + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.Comment("/// "), + ] + ); + } + + summaryTrivia = summaryTrivia.Add(SyntaxFactory.Comment("/// ")); + + yield return SyntaxFactory + .MethodDeclaration( + taskType, + ComputeOperationName(openApiOperation.Key, openApiOperation.Value) + ) + .WithModifiers(SyntaxFactory.TokenList()) + .WithParameterList(SyntaxFactory.ParameterList()) + .WithLeadingTrivia(summaryTrivia) // Add the summary as leading trivia + .WithTrailingTrivia( + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.CarriageReturnLineFeed + ) + .WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)); + } + } + } + + private MemberDeclarationSyntax ComputeClass() + { + IEnumerable classMembers = ComputeClassMembers(); + + classMembers = classMembers.Append( + SyntaxFactory + .ConstructorDeclaration(metadata.ClassName) + .AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword)) + .AddParameterListParameters( + SyntaxFactory + .Parameter(SyntaxFactory.Identifier("httpClient")) + .WithType(SyntaxFactory.ParseTypeName("global::System.Net.Http.HttpClient")) + ) + .WithBody( + SyntaxFactory.Block( + SyntaxFactory.ExpressionStatement( + SyntaxFactory.AssignmentExpression( + SyntaxKind.SimpleAssignmentExpression, + SyntaxFactory.IdentifierName("_httpClient"), + SyntaxFactory.IdentifierName("httpClient") + ) + ) + ) + ) + ); + + classMembers = classMembers.Prepend( + SyntaxFactory + .FieldDeclaration( + SyntaxFactory + .VariableDeclaration( + SyntaxFactory.ParseTypeName("global::System.Net.Http.HttpClient") + ) + .AddVariables(SyntaxFactory.VariableDeclarator("_httpClient")) + ) + .AddModifiers( + SyntaxFactory.Token(SyntaxKind.PrivateKeyword), + SyntaxFactory.Token(SyntaxKind.ReadOnlyKeyword) + ) + ); + + // Add GeneratedCodeAttribute to the class + return SyntaxFactory + .ClassDeclaration(metadata.ClassName) + .AddModifiers( + SyntaxFactory.Token(metadata.Access.ToSyntaxKind()), + SyntaxFactory.Token(SyntaxKind.PartialKeyword) + ) + .AddAttributeLists( + SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList(ComputeGeneratedAttribute())) + ) + .AddBaseListTypes( + SyntaxFactory.SimpleBaseType(SyntaxFactory.ParseTypeName('I' + metadata.ClassName)) + ) + .AddMembers([.. classMembers]) + .WithTrailingTrivia(SyntaxFactory.CarriageReturnLineFeed, SyntaxFactory.CarriageReturnLineFeed); + } + + private IEnumerable ComputeClassMembers() + { + foreach (KeyValuePair openApiPath in document.Paths) + { + foreach ( + KeyValuePair openApiOperation in openApiPath.Value.Operations + ?? [] + ) + { + // TODO: Handle parameters, request bodies, and responses + IdentifierNameSyntax taskType = SyntaxFactory.IdentifierName( + "global::System.Threading.Tasks.Task" + ); + + FieldDeclarationSyntax httpClientField = SyntaxFactory + .FieldDeclaration( + SyntaxFactory + .VariableDeclaration( + SyntaxFactory.ParseTypeName("global::System.Net.Http.HttpClient") + ) + .AddVariables(SyntaxFactory.VariableDeclarator("_httpClient")) + ) + .AddModifiers( + SyntaxFactory.Token(SyntaxKind.PrivateKeyword), + SyntaxFactory.Token(SyntaxKind.ReadOnlyKeyword) + ); + + PropertyDeclarationSyntax httpClientProperty = SyntaxFactory + .PropertyDeclaration( + SyntaxFactory.ParseTypeName("global::System.Net.Http.HttpClient"), + "HttpClient" + ) + .AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword)) + .WithExpressionBody( + SyntaxFactory.ArrowExpressionClause(SyntaxFactory.IdentifierName("_httpClient")) + ) + .WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)); + + ConstructorDeclarationSyntax constructor = SyntaxFactory + .ConstructorDeclaration(metadata.ClassName) + .AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword)) + .AddParameterListParameters( + SyntaxFactory + .Parameter(SyntaxFactory.Identifier("httpClient")) + .WithType(SyntaxFactory.ParseTypeName("global::System.Net.Http.HttpClient")) + ) + .WithBody( + SyntaxFactory.Block( + SyntaxFactory.ExpressionStatement( + SyntaxFactory.AssignmentExpression( + SyntaxKind.SimpleAssignmentExpression, + SyntaxFactory.IdentifierName("_httpClient"), + SyntaxFactory.IdentifierName("httpClient") + ) + ) + ) + ); + + yield return SyntaxFactory + .MethodDeclaration( + taskType, + ComputeOperationName(openApiOperation.Key, openApiOperation.Value) + ) + .WithModifiers(SyntaxFactory.TokenList(SyntaxFactory.Token(SyntaxKind.PublicKeyword))) + .WithParameterList(SyntaxFactory.ParameterList()) + .WithBody( + SyntaxFactory.Block( + SyntaxFactory.SingletonList( + SyntaxFactory.ReturnStatement( + SyntaxFactory.MemberAccessExpression( + SyntaxKind.SimpleMemberAccessExpression, + SyntaxFactory.IdentifierName("global::System.Threading.Tasks.Task"), + SyntaxFactory.IdentifierName("CompletedTask") + ) + ) + ) + ) + ) + .WithLeadingTrivia(SyntaxFactory.TriviaList(SyntaxFactory.Comment("/// "))) + .WithTrailingTrivia( + SyntaxFactory.CarriageReturnLineFeed, + SyntaxFactory.CarriageReturnLineFeed + ); + } + } + } + + private IEnumerable ComputeModels() + { + // TODO: Implement model generation based on OpenAPI document + yield break; + } + + private static string ComputeOperationName(HttpMethod httpMethod, OpenApiOperation operation) + { + StringBuilder nameBuilder = new(); + + // nameBuilder.Append( + // httpMethod.Method switch + // { + // "GET" => nameof(HttpMethod.Get), + // "POST" => nameof(HttpMethod.Post), + // "DELETE" => nameof(HttpMethod.Delete), + // "PUT" => nameof(HttpMethod.Put), + // "HEAD" => nameof(HttpMethod.Head), + // "OPTIONS" => nameof(HttpMethod.Options), + // "TRACE" => nameof(HttpMethod.Trace), + // "PATCH" => "Patch", + // _ => httpMethod.Method.ToPascalCase(), + // } + // ); + + return nameBuilder.Append(operation.OperationId?.ToPascalCase()).ToString(); + } + + private static AttributeSyntax ComputeGeneratedAttribute() + { + return SyntaxFactory.Attribute( + SyntaxFactory.ParseName("global::System.CodeDom.Compiler.GeneratedCode"), + SyntaxFactory.AttributeArgumentList( + SyntaxFactory.SeparatedList( + [ + SyntaxFactory.AttributeArgument( + SyntaxFactory.LiteralExpression( + SyntaxKind.StringLiteralExpression, + SyntaxFactory.Literal(GeneratorName) + ) + ), + SyntaxFactory.AttributeArgument( + SyntaxFactory.LiteralExpression( + SyntaxKind.StringLiteralExpression, + SyntaxFactory.Literal(GeneratorVersion) + ) + ), + ] + ) + ) + ); + } +} diff --git a/src/OpenApi.Client.SourceGenerators/Client/GenerationError.cs b/src/OpenApi.Client.SourceGenerators/Client/GenerationError.cs new file mode 100644 index 0000000..82318ab --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/Client/GenerationError.cs @@ -0,0 +1,22 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +namespace OpenApi.Client.SourceGenerators.Client; + +/// +/// Represents an error that occurred during the generation of an OpenAPI client. +/// +public sealed record GenerationError +{ + /// + /// The location of the error in the source code, if available. + /// + public required string Message { get; init; } + + /// + /// Reason for the generation error. + /// + public required GenerationErrorReason Reason { get; init; } +} diff --git a/src/OpenApi.Client.SourceGenerators/Generation/ClientGeneratorSerializer.cs b/src/OpenApi.Client.SourceGenerators/Client/GenerationErrorReason.cs similarity index 66% rename from src/OpenApi.Client.SourceGenerators/Generation/ClientGeneratorSerializer.cs rename to src/OpenApi.Client.SourceGenerators/Client/GenerationErrorReason.cs index 64418ec..ca177e4 100644 --- a/src/OpenApi.Client.SourceGenerators/Generation/ClientGeneratorSerializer.cs +++ b/src/OpenApi.Client.SourceGenerators/Client/GenerationErrorReason.cs @@ -3,10 +3,10 @@ // Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. // All Rights Reserved. -namespace OpenApi.Client.SourceGenerators.Generation; +namespace OpenApi.Client.SourceGenerators.Client; -public enum ClientGeneratorSerializer +public enum GenerationErrorReason { - SystemTextJson, - NewtonsoftJson + DocumentDeserializationFailed, + ClientGenerationFailed, } diff --git a/src/OpenApi.Client.SourceGenerators/Client/GenerationResult.cs b/src/OpenApi.Client.SourceGenerators/Client/GenerationResult.cs new file mode 100644 index 0000000..da266eb --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/Client/GenerationResult.cs @@ -0,0 +1,27 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +namespace OpenApi.Client.SourceGenerators.Client; + +/// +/// Represents the result of generating an OpenAPI client from a document. +/// +public sealed record GenerationResult +{ + /// + /// The generated client source code. + /// + public required string? GeneratedClient { get; init; } + + /// + /// A collection of errors that occurred during the generation process. + /// + public required ImmutableArray Errors { get; init; } + + /// + /// Indicates whether there were any errors during the generation process. + /// + public bool HasErrors => Errors.Length > 0; +} diff --git a/src/OpenApi.Client.SourceGenerators/Client/GeneratorData.cs b/src/OpenApi.Client.SourceGenerators/Client/GeneratorData.cs new file mode 100644 index 0000000..397dac6 --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/Client/GeneratorData.cs @@ -0,0 +1,32 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +namespace OpenApi.Client.SourceGenerators.Client; + +/// +/// Represents the metadata required for generating an OpenAPI client. +/// +public sealed record GeneratorData +{ + public required string NamespaceName { get; init; } + + public required string ClassName { get; init; } + + public required Accessibility Access { get; init; } + + public required SerializationTool SerializationTool { get; init; } + + public Stream? Source { get; init; } + + public string? Contents { get; init; } + + public required string? Templates { get; init; } + + public string[] Operations { get; init; } = []; + + public bool UseRecords { get; init; } = true; + + public bool Nullable { get; init; } = true; +} diff --git a/src/OpenApi.Client.SourceGenerators/Client/SerializationTool.cs b/src/OpenApi.Client.SourceGenerators/Client/SerializationTool.cs new file mode 100644 index 0000000..8b78bf0 --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/Client/SerializationTool.cs @@ -0,0 +1,22 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +namespace OpenApi.Client.SourceGenerators.Client; + +/// +/// Specifies the serialization tool to be used for generating the OpenAPI client. +/// +public enum SerializationTool +{ + /// + /// Uses System.Text.Json for serialization. + /// + SystemTextJson, + + /// + /// Uses Newtonsoft.Json for serialization. + /// + NewtonsoftJson, +} diff --git a/src/OpenApi.Client.SourceGenerators/Helpers/EquatableArray{T}.cs b/src/OpenApi.Client.SourceGenerators/Collections/EquatableArray.cs similarity index 86% rename from src/OpenApi.Client.SourceGenerators/Helpers/EquatableArray{T}.cs rename to src/OpenApi.Client.SourceGenerators/Collections/EquatableArray.cs index f522a3e..7a13d0e 100644 --- a/src/OpenApi.Client.SourceGenerators/Helpers/EquatableArray{T}.cs +++ b/src/OpenApi.Client.SourceGenerators/Collections/EquatableArray.cs @@ -7,34 +7,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; - -namespace OpenApi.Client.SourceGenerators.Helpers; - -/// -/// Extensions for . -/// -public static class EquatableArray -{ - /// - /// Creates an instance from a given . - /// - /// The type of items in the input array. - /// The input instance. - /// An instance from a given . - public static EquatableArray AsEquatableArray(this ImmutableArray array) - where T : IEquatable - { - return new(array); - } -} +namespace OpenApi.Client.SourceGenerators.Collections; /// /// An immutable, equatable array. This is equivalent to but with value equality support. /// /// The type of values in the array. -public readonly struct EquatableArray : IEquatable>, IEnumerable +internal readonly struct EquatableArray : IEquatable>, IEnumerable where T : IEquatable { /// @@ -78,7 +57,7 @@ public bool Equals(EquatableArray array) } /// - public override bool Equals([NotNullWhen(true)] object? obj) + public override bool Equals(object? obj) { return obj is EquatableArray array && Equals(this, array); } diff --git a/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiContract.cs b/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiContract.cs deleted file mode 100644 index 734a85e..0000000 --- a/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiContract.cs +++ /dev/null @@ -1,27 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Contracts; - -public sealed class OpenApiContract -{ - public required string Title { get; init; } - - public required string Description { get; init; } - - public required string Version { get; init; } - - public required string License { get; init; } - - public required string Access { get; init; } - - public required string Namespace { get; init; } - - public required string ClassName { get; init; } - - public required HashSet Paths { get; init; } - - public required HashSet Types { get; init; } -} diff --git a/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiContractParser.cs b/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiContractParser.cs deleted file mode 100644 index 0e419bc..0000000 --- a/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiContractParser.cs +++ /dev/null @@ -1,143 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using Microsoft.CodeAnalysis; -using OpenApi.Client.SourceGenerators.Converters; -using OpenApi.Client.SourceGenerators.Generation; -using OpenApi.Client.SourceGenerators.Schema; - -namespace OpenApi.Client.SourceGenerators.Contracts; - -public static class OpenApiContractParser -{ - public static OpenApiContract Parse( - string namespaceName, - string className, - Accessibility access, - IApiDocument document - ) - { - HashSet types = ConvertTypes(document.GetTypes()); - - return new OpenApiContract - { - Namespace = namespaceName, - ClassName = className, - Access = GetAccessName(access), - Title = document.GetTitle() ?? string.Empty, - Description = document.GetDescription() ?? string.Empty, - License = document.GetLicense() ?? string.Empty, - Version = document.GetVersion() ?? string.Empty, - Types = types, - Paths = ConvertPaths(document.GetPaths(), types), - }; - } - - private static string GetAccessName(Accessibility accessibility) - { - return accessibility switch - { - Accessibility.Internal => "internal", - Accessibility.Private => "private", - Accessibility.Protected => "protected", - Accessibility.ProtectedAndInternal => "protected internal", - Accessibility.ProtectedOrInternal => "protected internal", - _ => "public" - }; - } - - private static HashSet ConvertTypes(IEnumerable apiDocumentTypes) - { - HashSet types = new(); - - //foreach (ApiDocumentType type in apiDocumentTypes) - //{ - // types.Add( - // new OpenApiType - // { - // Name = type.Name, - // Summary = type.Summary?.Replace("\r\n", " ").Replace("\n", " ").Trim(), - // Properties = type.Properties.ToDictionary( - // apiProperty => PascalCaseConverter.Convert(apiProperty.Key), // Property name - // apiProperty => PropertyConverter.Convert(apiProperty.Value) // Property type - // ) - // } - // ); - //} - - return types; - } - - private static HashSet ConvertPaths( - IEnumerable apiDocumentPaths, - HashSet types - ) - { - HashSet paths = new(); - - foreach (ApiDocumentPath path in apiDocumentPaths) - { - paths.Add( - new OpenApiPath - { - Path = path.Path, - Name = ComputeMethodName(path.Method, path.OperationId), - Summary = RemoveUnsafeWords(path.Summary), - RequestBodyType = path.RequestBodyType, // TODO: Convert to OpenApiType, check whether exists - RequestQueryType = path.RequestBodyType, // TODO: Convert to OpenApiType, check whether exists - ResponseType = path.ResponseType, // TODO: Convert to OpenApiType, check whether exists - PathElementsType = path.PathElementsType, // TODO: Convert to OpenApiType, check whether exists - Method = path.Method switch - { - ApiDocumentMethod.Put => OpenApiMethod.Put, - ApiDocumentMethod.Post => OpenApiMethod.Post, - ApiDocumentMethod.Delete => OpenApiMethod.Delete, - ApiDocumentMethod.Options => OpenApiMethod.Options, - ApiDocumentMethod.Head => OpenApiMethod.Head, - ApiDocumentMethod.Patch => OpenApiMethod.Patch, - _ => OpenApiMethod.Get - } - } - ); - } - - return paths; - } - - private static string ComputeMethodName(ApiDocumentMethod method, string operationId) - { - return /* ComputePrefix(method) + */ - PascalCaseConverter.Convert(RemoveUnsafeWords(operationId)) + "Async"; - } - - private static string? RemoveUnsafeWords(string? input) - { - if (input is null) - { - return null; - } - - foreach (string placeholder in ClientGenerator.Placeholders) - { - input = input.Replace(placeholder, string.Empty); - } - - return input; - } - - private static string ComputePrefix(ApiDocumentMethod method) - { - return method switch - { - ApiDocumentMethod.Put => "Put", - ApiDocumentMethod.Post => "Post", - ApiDocumentMethod.Delete => "Delete", - ApiDocumentMethod.Options => "Options", - ApiDocumentMethod.Head => "Head", - ApiDocumentMethod.Patch => "Patch", - _ => "Get" - }; - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiMethod.cs b/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiMethod.cs deleted file mode 100644 index 66bf385..0000000 --- a/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiMethod.cs +++ /dev/null @@ -1,18 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Contracts; - -public enum OpenApiMethod -{ - Get, - Put, - Post, - Delete, - Options, - Head, - Patch, - Trace -} diff --git a/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiPath.cs b/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiPath.cs deleted file mode 100644 index 75211d6..0000000 --- a/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiPath.cs +++ /dev/null @@ -1,25 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Contracts; - -public readonly struct OpenApiPath -{ - public readonly required string Name { get; init; } - - public readonly required string Path { get; init; } - - public readonly string? Summary { get; init; } - - public readonly required string? RequestBodyType { get; init; } - - public readonly required string? RequestQueryType { get; init; } - - public readonly required string? PathElementsType { get; init; } - - public readonly required string? ResponseType { get; init; } - - public readonly required OpenApiMethod Method { get; init; } -} diff --git a/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiType.cs b/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiType.cs deleted file mode 100644 index e4ed286..0000000 --- a/src/OpenApi.Client.SourceGenerators/Contracts/OpenApiType.cs +++ /dev/null @@ -1,15 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Contracts; - -public readonly struct OpenApiType -{ - public readonly required string Name { get; init; } - - public readonly string? Summary { get; init; } - - public required IDictionary Properties { get; init; } -} diff --git a/src/OpenApi.Client.SourceGenerators/Converters/AccessibilityConverter.cs b/src/OpenApi.Client.SourceGenerators/Converters/AccessibilityConverter.cs new file mode 100644 index 0000000..309f5fc --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/Converters/AccessibilityConverter.cs @@ -0,0 +1,21 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +namespace OpenApi.Client.SourceGenerators.Converters; + +internal static class AccessibilityConverter +{ + public static SyntaxKind ToSyntaxKind(this Accessibility value) + { + return value switch + { + Accessibility.Public => SyntaxKind.PublicKeyword, + Accessibility.Private => SyntaxKind.PrivateKeyword, + Accessibility.Protected => SyntaxKind.ProtectedKeyword, + Accessibility.Internal => SyntaxKind.InternalKeyword, + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null), + }; + } +} diff --git a/src/OpenApi.Client.SourceGenerators/Converters/PascalCaseConverter.cs b/src/OpenApi.Client.SourceGenerators/Converters/PascalCaseConverter.cs index 767e0c4..9d73250 100644 --- a/src/OpenApi.Client.SourceGenerators/Converters/PascalCaseConverter.cs +++ b/src/OpenApi.Client.SourceGenerators/Converters/PascalCaseConverter.cs @@ -11,6 +11,23 @@ public static class PascalCaseConverter { private static readonly Regex regex = new Regex(@"[^a-zA-Z0-9\s]", RegexOptions.Compiled); + /// + /// Converts a string to PascalCase. + /// + public static string ToPascalCase(this string value) + { + if (string.IsNullOrEmpty(value)) + { + return string.Empty; + } + + // Convert to PascalCase using the Convert method + return Convert(value); + } + + /// + /// Converts a string to PascalCase by removing special characters and capitalizing the first letter of each word. + /// public static string Convert(string? value) { if (string.IsNullOrEmpty(value) || value!.Length == 0) diff --git a/src/OpenApi.Client.SourceGenerators/Converters/PropertyConverter.cs b/src/OpenApi.Client.SourceGenerators/Converters/PropertyConverter.cs deleted file mode 100644 index e39d997..0000000 --- a/src/OpenApi.Client.SourceGenerators/Converters/PropertyConverter.cs +++ /dev/null @@ -1,41 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Converters; - -public static class PropertyConverter -{ - public static string Convert(string? value) - { - if (string.IsNullOrEmpty(value) || value!.Length == 0) - { - return "object?"; - } - - value = value.ToLowerInvariant(); - - if (value == "array") - { - return "object?[]?"; - } - - if (value == "integer") - { - return "int"; - } - - if (value == "number") - { - return "double"; - } - - if (value == "boolean") - { - return "bool"; - } - - return "object?"; - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs b/src/OpenApi.Client.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs index 0d38a3d..b7c7ac0 100644 --- a/src/OpenApi.Client.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs +++ b/src/OpenApi.Client.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs @@ -3,8 +3,6 @@ // Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. // All Rights Reserved. -using Microsoft.CodeAnalysis; - namespace OpenApi.Client.SourceGenerators.Diagnostics; /// @@ -12,7 +10,7 @@ namespace OpenApi.Client.SourceGenerators.Diagnostics; /// internal static class DiagnosticDescriptors { - public static readonly DiagnosticDescriptor DocumentMissing = new DiagnosticDescriptor( + public static readonly DiagnosticDescriptor DocumentMissing = new( id: "OAPIC001", title: "Missing OpenAPI document", messageFormat: "Open API document with name \"{0}\" is missing", @@ -23,7 +21,7 @@ internal static class DiagnosticDescriptors helpLinkUri: "https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC001.md" ); - public static readonly DiagnosticDescriptor DocumentEmpty = new DiagnosticDescriptor( + public static readonly DiagnosticDescriptor DocumentEmpty = new( id: "OAPIC002", title: "Empty OpenAPI document", messageFormat: "Open API document with name \"{0}\" is empty", @@ -34,19 +32,18 @@ internal static class DiagnosticDescriptors helpLinkUri: "https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC002.md" ); - public static readonly DiagnosticDescriptor DocumentDeserializationFailed = - new DiagnosticDescriptor( - id: "OAPIC003", - title: "Deserializing OpenAPI document failed", - messageFormat: "Deserialization of document \"{0}\" failed with message: \"{1}\"", - category: "OpenApi.Client.SourceGenerators.DocumentDeserializationFailed", - defaultSeverity: DiagnosticSeverity.Error, - isEnabledByDefault: true, - description: "The document was read successfully, but it failed to deserialize into an object.", - helpLinkUri: "https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC003.md" - ); + public static readonly DiagnosticDescriptor DocumentDeserializationFailed = new( + id: "OAPIC003", + title: "Deserializing OpenAPI document failed", + messageFormat: "Deserialization of document \"{0}\" failed with message: \"{1}\"", + category: "OpenApi.Client.SourceGenerators.DocumentDeserializationFailed", + defaultSeverity: DiagnosticSeverity.Error, + isEnabledByDefault: true, + description: "The document was read successfully, but it failed to deserialize into an object.", + helpLinkUri: "https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC003.md" + ); - public static readonly DiagnosticDescriptor GenerationFailed = new DiagnosticDescriptor( + public static readonly DiagnosticDescriptor GenerationFailed = new( id: "OAPIC004", title: "Generating OpenAPI Client failed", messageFormat: "Generation of source code from document \"{0}\" failed with message: \"{1}\"", @@ -57,7 +54,7 @@ internal static class DiagnosticDescriptors helpLinkUri: "https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC004.md" ); - public static readonly DiagnosticDescriptor GeneratedSourceEmpty = new DiagnosticDescriptor( + public static readonly DiagnosticDescriptor GeneratedSourceEmpty = new( id: "OAPIC005", title: "Generating OpenAPI Client failed", messageFormat: "Generation of source code from document \"{0}\" failed", @@ -68,7 +65,7 @@ internal static class DiagnosticDescriptors helpLinkUri: "https://github.com/lepoco/openapi.client/blob/main/documentation/OAPIC005.md" ); - public static readonly DiagnosticDescriptor MissingPaths = new DiagnosticDescriptor( + public static readonly DiagnosticDescriptor MissingPaths = new( id: "OAPIC006", title: "No paths in OpenAPI document", messageFormat: "No paths to generate in the file \"{0}\" were found", diff --git a/src/OpenApi.Client.SourceGenerators/Models/DiagnosticInfo.cs b/src/OpenApi.Client.SourceGenerators/Diagnostics/DiagnosticInfo.cs similarity index 88% rename from src/OpenApi.Client.SourceGenerators/Models/DiagnosticInfo.cs rename to src/OpenApi.Client.SourceGenerators/Diagnostics/DiagnosticInfo.cs index 1a34167..9b7fef7 100644 --- a/src/OpenApi.Client.SourceGenerators/Models/DiagnosticInfo.cs +++ b/src/OpenApi.Client.SourceGenerators/Diagnostics/DiagnosticInfo.cs @@ -10,11 +10,10 @@ // This file is ported and adapted from ComputeSharp (Sergio0694/ComputeSharp), // more info in ThirdPartyNotices.txt in the root of the project. -using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Text; -using OpenApi.Client.SourceGenerators.Helpers; +using OpenApi.Client.SourceGenerators.Collections; -namespace OpenApi.Client.SourceGenerators.Models; +namespace OpenApi.Client.SourceGenerators.Diagnostics; /// /// A model for a serializeable diagnostic info. @@ -38,11 +37,7 @@ public Diagnostic ToDiagnostic() { if (SyntaxTree is not null) { - return Diagnostic.Create( - Descriptor, - Location.Create(SyntaxTree, TextSpan), - Arguments.ToArray() - ); + return Diagnostic.Create(Descriptor, Location.Create(SyntaxTree, TextSpan), Arguments.ToArray()); } return Diagnostic.Create(Descriptor, null, Arguments.ToArray()); @@ -55,11 +50,7 @@ public Diagnostic ToDiagnostic() /// The source to attach the diagnostics to. /// The optional arguments for the formatted message to include. /// A new instance with the specified parameters. - public static DiagnosticInfo Create( - DiagnosticDescriptor descriptor, - ISymbol symbol, - params object[] args - ) + public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, ISymbol symbol, params object[] args) { Location location = symbol.Locations.First(); diff --git a/src/OpenApi.Client.SourceGenerators/Extensions/DiagnosticsExtensions.cs b/src/OpenApi.Client.SourceGenerators/Extensions/DiagnosticsExtensions.cs deleted file mode 100644 index 36dbd09..0000000 --- a/src/OpenApi.Client.SourceGenerators/Extensions/DiagnosticsExtensions.cs +++ /dev/null @@ -1,98 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// This file is ported and adapted from ComputeSharp (Sergio0694/ComputeSharp), -// more info in ThirdPartyNotices.txt in the root of the project. - -using Microsoft.CodeAnalysis; -using OpenApi.Client.SourceGenerators.Helpers; -using OpenApi.Client.SourceGenerators.Models; - -namespace OpenApi.Client.SourceGenerators.Extensions; - -/// -/// Extension methods for , specifically for reporting diagnostics. -/// -internal static class DiagnosticsExtensions -{ - /// - /// Adds a new diagnostics to the target builder. - /// - /// The collection of produced instances. - /// The input for the diagnostics to create. - /// The source to attach the diagnostics to. - /// The optional arguments for the formatted message to include. - public static void Add( - this in ImmutableArrayBuilder diagnostics, - DiagnosticDescriptor descriptor, - ISymbol symbol, - params object[] args - ) - { - diagnostics.Add(DiagnosticInfo.Create(descriptor, symbol, args)); - } - - /// - /// Adds a new diagnostics to the target builder. - /// - /// The collection of produced instances. - /// The input for the diagnostics to create. - /// The source to attach the diagnostics to. - /// The optional arguments for the formatted message to include. - public static void Add( - this in ImmutableArrayBuilder diagnostics, - DiagnosticDescriptor descriptor, - SyntaxNode node, - params object[] args - ) - { - diagnostics.Add(DiagnosticInfo.Create(descriptor, node, args)); - } - - /// - /// Registers an output node into an to output diagnostics. - /// - /// The input instance. - /// The input sequence of diagnostics. - public static void ReportDiagnostics( - this IncrementalGeneratorInitializationContext context, - IncrementalValuesProvider diagnostics - ) - { - context.RegisterSourceOutput( - diagnostics, - static (context, diagnostic) => - { - context.ReportDiagnostic(diagnostic.ToDiagnostic()); - } - ); - } - - /// - /// Registers an output node into an to output diagnostics. - /// - /// The input instance. - /// The input sequence of diagnostics. - public static void ReportDiagnostics( - this IncrementalGeneratorInitializationContext context, - IncrementalValuesProvider> diagnostics - ) - { - context.RegisterSourceOutput( - diagnostics, - static (context, diagnostics) => - { - foreach (DiagnosticInfo diagnostic in diagnostics) - { - context.ReportDiagnostic(diagnostic.ToDiagnostic()); - } - } - ); - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Extensions/ISymbolExtensions.cs b/src/OpenApi.Client.SourceGenerators/Extensions/ISymbolExtensions.cs deleted file mode 100644 index dc548bf..0000000 --- a/src/OpenApi.Client.SourceGenerators/Extensions/ISymbolExtensions.cs +++ /dev/null @@ -1,198 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Diagnostics.CodeAnalysis; -using Microsoft.CodeAnalysis; - -namespace OpenApi.Client.SourceGenerators.Extensions; - -/// -/// Extension methods for the type. -/// -internal static class ISymbolExtensions -{ - /// - /// Gets the fully qualified name for a given symbol. - /// - /// The input instance. - /// The fully qualified name for . - public static string GetFullyQualifiedName(this ISymbol symbol) - { - return symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat); - } - - /// - /// Gets the fully qualified name for a given symbol, including nullability annotations - /// - /// The input instance. - /// The fully qualified name for . - public static string GetFullyQualifiedNameWithNullabilityAnnotations(this ISymbol symbol) - { - return symbol.ToDisplayString( - SymbolDisplayFormat.FullyQualifiedFormat.AddMiscellaneousOptions( - SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier - ) - ); - } - - /// - /// Checks whether or not a given type symbol has a specified full name. - /// - /// The input instance to check. - /// The full name to check. - /// Whether has a full name equals to . - public static bool HasFullyQualifiedName(this ISymbol symbol, string name) - { - return symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) == name; - } - - /// - /// Checks whether or not a given symbol has an attribute with the specified fully qualified metadata name. - /// - /// The input instance to check. - /// The attribute name to look for. - /// Whether or not has an attribute with the specified name. - public static bool HasAttributeWithFullyQualifiedMetadataName(this ISymbol symbol, string name) - { - foreach (AttributeData attribute in symbol.GetAttributes()) - { - if (attribute.AttributeClass?.HasFullyQualifiedMetadataName(name) == true) - { - return true; - } - } - - return false; - } - - /// - /// Checks whether or not a given symbol has an attribute with the specified type. - /// - /// The input instance to check. - /// The instance for the attribute type to look for. - /// Whether or not has an attribute with the specified type. - public static bool HasAttributeWithType(this ISymbol symbol, ITypeSymbol typeSymbol) - { - return TryGetAttributeWithType(symbol, typeSymbol, out _); - } - - /// - /// Tries to get an attribute with the specified type. - /// - /// The input instance to check. - /// The instance for the attribute type to look for. - /// The resulting attribute, if it was found. - /// Whether or not has an attribute with the specified type. - public static bool TryGetAttributeWithType( - this ISymbol symbol, - ITypeSymbol typeSymbol, - [NotNullWhen(true)] out AttributeData? attributeData - ) - { - foreach (AttributeData attribute in symbol.GetAttributes()) - { - if (SymbolEqualityComparer.Default.Equals(attribute.AttributeClass, typeSymbol)) - { - attributeData = attribute; - - return true; - } - } - - attributeData = null; - - return false; - } - -#if !ROSLYN_4_3_1_OR_GREATER - /// - /// Tries to get an attribute with the specified fully qualified metadata name. - /// - /// The input instance to check. - /// The attribute name to look for. - /// The resulting attribute, if it was found. - /// Whether or not has an attribute with the specified name. - public static bool TryGetAttributeWithFullyQualifiedMetadataName( - this ISymbol symbol, - string name, - [NotNullWhen(true)] out AttributeData? attributeData - ) - { - foreach (AttributeData attribute in symbol.GetAttributes()) - { - if (attribute.AttributeClass?.HasFullyQualifiedMetadataName(name) == true) - { - attributeData = attribute; - - return true; - } - } - - attributeData = null; - - return false; - } -#endif - - /// - /// Calculates the effective accessibility for a given symbol. - /// - /// The instance to check. - /// The effective accessibility for . - public static Accessibility GetEffectiveAccessibility(this ISymbol symbol) - { - // Start by assuming it's visible - Accessibility visibility = Accessibility.Public; - - // Handle special cases - switch (symbol.Kind) - { - case SymbolKind.Alias: - return Accessibility.Private; - case SymbolKind.Parameter: - return GetEffectiveAccessibility(symbol.ContainingSymbol); - case SymbolKind.TypeParameter: - return Accessibility.Private; - } - - // Traverse the symbol hierarchy to determine the effective accessibility - while (symbol is not null && symbol.Kind != SymbolKind.Namespace) - { - switch (symbol.DeclaredAccessibility) - { - case Accessibility.NotApplicable: - case Accessibility.Private: - return Accessibility.Private; - case Accessibility.Internal: - case Accessibility.ProtectedAndInternal: - visibility = Accessibility.Internal; - break; - } - - symbol = symbol.ContainingSymbol; - } - - return visibility; - } - - /// - /// Checks whether or not a given symbol can be accessed from a specified assembly. - /// - /// The input instance to check. - /// The assembly to check the accessibility of for. - /// Whether can access . - public static bool CanBeAccessedFrom(this ISymbol symbol, IAssemblySymbol assembly) - { - Accessibility accessibility = symbol.GetEffectiveAccessibility(); - - return accessibility == Accessibility.Public - || accessibility == Accessibility.Internal - && symbol.ContainingAssembly.GivesAccessTo(assembly); - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Extensions/ITypeSymbolExtensions.cs b/src/OpenApi.Client.SourceGenerators/Extensions/ITypeSymbolExtensions.cs deleted file mode 100644 index 7456f07..0000000 --- a/src/OpenApi.Client.SourceGenerators/Extensions/ITypeSymbolExtensions.cs +++ /dev/null @@ -1,295 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.CodeAnalysis; -using OpenApi.Client.SourceGenerators.Helpers; - -namespace OpenApi.Client.SourceGenerators.Extensions; - -/// -/// Extension methods for the type. -/// -internal static class ITypeSymbolExtensions -{ - /// - /// Checks whether or not a given has or inherits from a specified type. - /// - /// The target instance to check. - /// The full name of the type to check for inheritance. - /// Whether or not is or inherits from . - public static bool HasOrInheritsFromFullyQualifiedMetadataName( - this ITypeSymbol typeSymbol, - string name - ) - { - for ( - ITypeSymbol? currentType = typeSymbol; - currentType is not null; - currentType = currentType.BaseType - ) - { - if (currentType.HasFullyQualifiedMetadataName(name)) - { - return true; - } - } - - return false; - } - - /// - /// Checks whether or not a given inherits from a specified type. - /// - /// The target instance to check. - /// The full name of the type to check for inheritance. - /// Whether or not inherits from . - public static bool InheritsFromFullyQualifiedMetadataName( - this ITypeSymbol typeSymbol, - string name - ) - { - INamedTypeSymbol? baseType = typeSymbol.BaseType; - - while (baseType is not null) - { - if (baseType.HasFullyQualifiedMetadataName(name)) - { - return true; - } - - baseType = baseType.BaseType; - } - - return false; - } - - /// - /// Checks whether or not a given inherits from a specified type. - /// - /// The target instance to check. - /// The instane to check for inheritance from. - /// Whether or not inherits from . - public static bool InheritsFromType(this ITypeSymbol typeSymbol, ITypeSymbol baseTypeSymbol) - { - INamedTypeSymbol? currentBaseTypeSymbol = typeSymbol.BaseType; - - while (currentBaseTypeSymbol is not null) - { - if (SymbolEqualityComparer.Default.Equals(currentBaseTypeSymbol, baseTypeSymbol)) - { - return true; - } - - currentBaseTypeSymbol = currentBaseTypeSymbol.BaseType; - } - - return false; - } - - /// - /// Checks whether or not a given implements an interface with a specified name. - /// - /// The target instance to check. - /// The full name of the type to check for interface implementation. - /// Whether or not has an interface with the specified name. - public static bool HasInterfaceWithFullyQualifiedMetadataName( - this ITypeSymbol typeSymbol, - string name - ) - { - foreach (INamedTypeSymbol interfaceType in typeSymbol.AllInterfaces) - { - if (interfaceType.HasFullyQualifiedMetadataName(name)) - { - return true; - } - } - - return false; - } - - /// - /// Checks whether or not a given has or inherits a specified attribute. - /// - /// The target instance to check. - /// The predicate used to match available attributes. - /// Whether or not has an attribute matching . - public static bool HasOrInheritsAttribute( - this ITypeSymbol typeSymbol, - Func predicate - ) - { - for ( - ITypeSymbol? currentType = typeSymbol; - currentType is not null; - currentType = currentType.BaseType - ) - { - if (currentType.GetAttributes().Any(predicate)) - { - return true; - } - } - - return false; - } - - /// - /// Checks whether or not a given has or inherits a specified attribute. - /// - /// The target instance to check. - /// The name of the attribute to look for. - /// Whether or not has an attribute with the specified type name. - public static bool HasOrInheritsAttributeWithFullyQualifiedMetadataName( - this ITypeSymbol typeSymbol, - string name - ) - { - for ( - ITypeSymbol? currentType = typeSymbol; - currentType is not null; - currentType = currentType.BaseType - ) - { - if (currentType.HasAttributeWithFullyQualifiedMetadataName(name)) - { - return true; - } - } - - return false; - } - - /// - /// Checks whether or not a given has or inherits a specified attribute. - /// - /// The target instance to check. - /// The instane to check for inheritance from. - /// Whether or not has or inherits an attribute of type . - public static bool HasOrInheritsAttributeWithType( - this ITypeSymbol typeSymbol, - ITypeSymbol baseTypeSymbol - ) - { - for ( - ITypeSymbol? currentType = typeSymbol; - currentType is not null; - currentType = currentType.BaseType - ) - { - if (currentType.HasAttributeWithType(baseTypeSymbol)) - { - return true; - } - } - - return false; - } - - /// - /// Checks whether or not a given inherits a specified attribute. - /// If the type has no base type, this method will automatically handle that and return . - /// - /// The target instance to check. - /// The name of the attribute to look for. - /// Whether or not has an attribute with the specified type name. - public static bool InheritsAttributeWithFullyQualifiedMetadataName( - this ITypeSymbol typeSymbol, - string name - ) - { - if (typeSymbol.BaseType is INamedTypeSymbol baseTypeSymbol) - { - return HasOrInheritsAttributeWithFullyQualifiedMetadataName(baseTypeSymbol, name); - } - - return false; - } - - /// - /// Checks whether or not a given type symbol has a specified fully qualified metadata name. - /// - /// The input instance to check. - /// The full name to check. - /// Whether has a full name equals to . - public static bool HasFullyQualifiedMetadataName(this ITypeSymbol symbol, string name) - { - using ImmutableArrayBuilder builder = ImmutableArrayBuilder.Rent(); - - symbol.AppendFullyQualifiedMetadataName(in builder); - - return builder.WrittenSpan.SequenceEqual(name.AsSpan()); - } - - /// - /// Gets the fully qualified metadata name for a given instance. - /// - /// The input instance. - /// The fully qualified metadata name for . - public static string GetFullyQualifiedMetadataName(this ITypeSymbol symbol) - { - using ImmutableArrayBuilder builder = ImmutableArrayBuilder.Rent(); - - symbol.AppendFullyQualifiedMetadataName(in builder); - - return builder.ToString(); - } - - /// - /// Appends the fully qualified metadata name for a given symbol to a target builder. - /// - /// The input instance. - /// The target instance. - private static void AppendFullyQualifiedMetadataName( - this ITypeSymbol symbol, - in ImmutableArrayBuilder builder - ) - { - static void BuildFrom(ISymbol? symbol, in ImmutableArrayBuilder builder) - { - switch (symbol) - { - // Namespaces that are nested also append a leading '.' - case INamespaceSymbol { ContainingNamespace.IsGlobalNamespace: false }: - BuildFrom(symbol.ContainingNamespace, in builder); - builder.Add('.'); - builder.AddRange(symbol.MetadataName.AsSpan()); - break; - - // Other namespaces (ie. the one right before global) skip the leading '.' - case INamespaceSymbol { IsGlobalNamespace: false }: - builder.AddRange(symbol.MetadataName.AsSpan()); - break; - - // Types with no namespace just have their metadata name directly written - case ITypeSymbol { ContainingSymbol: INamespaceSymbol { IsGlobalNamespace: true } }: - builder.AddRange(symbol.MetadataName.AsSpan()); - break; - - // Types with a containing non-global namespace also append a leading '.' - case ITypeSymbol { ContainingSymbol: INamespaceSymbol namespaceSymbol }: - BuildFrom(namespaceSymbol, in builder); - builder.Add('.'); - builder.AddRange(symbol.MetadataName.AsSpan()); - break; - - // Nested types append a leading '+' - case ITypeSymbol { ContainingSymbol: ITypeSymbol typeSymbol }: - BuildFrom(typeSymbol, in builder); - builder.Add('+'); - builder.AddRange(symbol.MetadataName.AsSpan()); - break; - default: - break; - } - } - - BuildFrom(symbol, in builder); - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Attributes.cs b/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Attributes.cs deleted file mode 100644 index adcdd20..0000000 --- a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Attributes.cs +++ /dev/null @@ -1,31 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Contracts; - -namespace OpenApi.Client.SourceGenerators.Generation; - -internal sealed partial class ClientGenerator -{ - public const string AtttributesHeader = """ - /// Represents an attribute used to specify the name of a property as it appears in the OpenAPI document. - [global::System.CodeDom.Compiler.GeneratedCode("OpenApiClient", "%VERSION%")] - %ACCESS% sealed class OpenApiPropertyAttribute : global::System.Attribute - { - public OpenApiPropertyAttribute(string name) - { - Name = name; - } - - public string Name { get; } - } - - """; - - public static void AppendAttributes(StringBuilder builder, OpenApiContract contract) - { - builder.AppendLine(AtttributesHeader); - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Class.cs b/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Class.cs deleted file mode 100644 index 4d4d693..0000000 --- a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Class.cs +++ /dev/null @@ -1,285 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Contracts; - -namespace OpenApi.Client.SourceGenerators.Generation; - -internal sealed partial class ClientGenerator -{ - private const string SystemTextJsonClassHeader = """ - [global::System.CodeDom.Compiler.GeneratedCode("OpenApiClient", "%VERSION%")] - %ACCESS% partial class %CLASS% : I%CLASS% - { - private global::System.Net.HttpStatusCode? lastStatusCode; - - /// The JSON serializer used for the Open API Client. - protected IOpenApiJsonSerializer serializer; - - /// The HTTP Client used for the Open API Client. - protected global::System.Net.Http.HttpClient HttpClient; - - /// Initializes a new instance of the class using the provided HttpClient. Uses a default instance of for serialization. - public %CLASS%(global::System.Net.Http.HttpClient httpClient) - { - HttpClient = httpClient; - serializer = new OpenApiJsonSerializer(); - } - - /// Initializes a new instance of the class using the provided HttpClient and JsonSerializerOptions. Uses an instance of configured with the provided for serialization. - public %CLASS%(global::System.Net.Http.HttpClient httpClient, global::System.Text.Json.JsonSerializerOptions jsonSettings) - { - HttpClient = httpClient; - serializer = new OpenApiJsonSerializer(jsonSettings); - } - - /// Initializes a new instance of the class using the provided HttpClient and IOpenApiJsonSerializer. - public %CLASS%(global::System.Net.Http.HttpClient httpClient, IOpenApiJsonSerializer serializer) - { - HttpClient = httpClient; - serializer = serializer; - } - - """; - - private const string NewtonsoftJsonClassHeader = """ - [global::System.CodeDom.Compiler.GeneratedCode("OpenApiClient", "%VERSION%")] - %ACCESS% partial class %CLASS% : I%CLASS% - { - private global::System.Net.HttpStatusCode? lastStatusCode; - - private OpenApiJsonSerializer serializer; - - /// The HTTP Client used for the Open API Client. - protected readonly global::System.Net.Http.HttpClient HttpClient; - - /// Initializes a new instance of the class using the provided HttpClient. Uses a default instance of for serialization. - public %CLASS%(global::System.Net.Http.HttpClient httpClient) - { - HttpClient = httpClient; - serializer = new OpenApiJsonSerializer(); - } - - /// Initializes a new instance of the class using the provided HttpClient and JsonSerializerOptions. Uses an instance of configured with the provided for serialization. - public %CLASS%(global::System.Net.Http.HttpClient httpClient, global::Newtonsoft.Json.JsonSerializerSettings jsonSettings) - { - HttpClient = httpClient; - serializer = new OpenApiJsonSerializer(jsonSettings); - } - - /// Initializes a new instance of the class using the provided HttpClient and IOpenApiJsonSerializer. - public %CLASS%(global::System.Net.Http.HttpClient httpClient, IOpenApiJsonSerializer serializer) - { - HttpClient = httpClient; - serializer = serializer; - } - - """; - - private const string ClassFooter = """ - /// - public virtual global::System.Net.HttpStatusCode? GetLastStatusCode() - { - return lastStatusCode; - } - - /// Sets the last status code. - protected virtual void SetStatusCode(global::System.Net.HttpStatusCode? statusCode) - { - lastStatusCode = statusCode; - } - - /// Resets the last status code. - protected virtual void ResetStatusCode() - { - lastStatusCode = null; - } - - /// Executes the HTTP request. - protected virtual async global::System.Threading.Tasks.Task ExecuteRequestAsync(global::System.Net.Http.HttpMethod method, string path, string? body, global::System.Threading.CancellationToken cancellationToken) - { - lastStatusCode = null; - global::System.Net.Http.HttpRequestMessage requestMessage = new global::System.Net.Http.HttpRequestMessage(method, new global::System.Uri(path, global::System.UriKind.RelativeOrAbsolute)); - - if (body != null) - { - requestMessage.Content = new global::System.Net.Http.StringContent(body, global::System.Text.Encoding.UTF8, "application/json"); - } - - using (global::System.Net.Http.HttpResponseMessage response = await HttpClient.SendAsync(requestMessage, cancellationToken)) - { - lastStatusCode = response.StatusCode; - - return await response.Content.ReadAsStringAsync(); - } - } - - /// Tries to serialize body returned by HTTP request. - protected virtual string? SerializeRequest(TRequest? input) where TRequest : class - { - if (input == null) - { - return null; - } - - return serializer.Serialize(input); - } - - /// Tries to serialize body returned by HTTP request. - protected virtual TResponse? DeserializeResponse(string? input) where TResponse : class - { - if (input == null) - { - return default; - } - - return serializer.Deserialize(input); - } - - /// Computes path string for HTTP request. - protected virtual string? ComputePath(string? path, params string[] parameters) - { - if (parameters.Length == 0) - { - return path; - } - - return string.Format(path, parameters); - } - - /// Computes query string for HTTP request. - protected virtual string? ComputeQueryString(TQuery? input) where TQuery : class - { - if (input == null) - { - return null; - } - - global::System.Reflection.PropertyInfo[] properties = input.GetType().GetProperties(global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.Instance); - global::System.Text.StringBuilder queryString = new global::System.Text.StringBuilder(); - - foreach (global::System.Reflection.PropertyInfo? property in properties) - { - string? value = property.GetValue(input)?.ToString().Trim(); - - if (value.Length > 0) - { - if (queryString.Length > 0) - { - queryString.Append("&"); - } - - OpenApiPropertyAttribute? attribute = global::System.Reflection.CustomAttributeExtensions.GetCustomAttribute(property); - string name = attribute?.Name ?? property.Name; - - queryString.Append(global::System.Uri.EscapeDataString(name)); - queryString.Append('='); - queryString.Append(global::System.Uri.EscapeDataString(value)); - } - } - - if (queryString.Length > 0) - { - queryString.Insert(0, '?'); - } - - return queryString.ToString(); - } - } - - """; - - private static void AppendClass( - StringBuilder builder, - OpenApiContract contract, - ClientGeneratorSerializer serializer - ) - { - builder.AppendLine( - serializer == ClientGeneratorSerializer.SystemTextJson - ? SystemTextJsonClassHeader - : NewtonsoftJsonClassHeader - ); - int methodsCount = 0; - - foreach (OpenApiPath path in contract.Paths) - { - if (methodsCount > 0) - { - builder.AppendLine(); - } - - if (path.Summary?.Length > 0) - { - builder.AppendLine(" /// "); - } - - builder.Append( - " public virtual async global::System.Threading.Tasks.Task<%CLASS%Result" - ); - - if (path.ResponseType?.Length > 0) - { - builder.Append("<"); - builder.Append(path.ResponseType); - builder.Append(">"); - } - - builder.Append("> "); - builder.Append(path.Name); - builder.Append("("); - - if (path.RequestBodyType?.Length > 0) - { - builder.Append(path.RequestBodyType); - builder.Append(" request, "); - } - - if (path.RequestQueryType?.Length > 0) - { - builder.Append(path.RequestQueryType); - builder.Append(" query, "); - } - - builder.AppendLine("global::System.Threading.CancellationToken cancellationToken)"); - builder.AppendLine( - $$$""" - { - string? responseBody = null; - string[] pathParameters = new string[0]; - - try - { - responseBody = await ExecuteRequestAsync( - global::System.Net.Http.HttpMethod.Get, - ComputePath({{{( - "\"" - + path.Path - + "\"" - + (path.RequestQueryType?.Length > 0 ? " + ComputeQueryString(query)" : null) - )}}}, pathParameters), - {{{( - path.RequestBodyType?.Length > 0 ? "SerializeRequest(request)" : "null" - )}}}, - cancellationToken - ); - } - catch (global::System.Exception e) - { - return new %CLASS%Result(new %CLASS%ResultError[]{new %CLASS%ResultError(e.Message)}, lastStatusCode); - } - - return new %CLASS%Result(lastStatusCode); - } - - """ - ); - - methodsCount++; - } - - builder.AppendLine(ClassFooter); - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Interface.cs b/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Interface.cs deleted file mode 100644 index da7cb97..0000000 --- a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Interface.cs +++ /dev/null @@ -1,80 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Contracts; - -namespace OpenApi.Client.SourceGenerators.Generation; - -internal sealed partial class ClientGenerator -{ - public const string InterfaceHeader = """ - /// An interface for the %TITLE% Open API Client. - /// Generated with Open API Client Source Generator. See: - [global::System.CodeDom.Compiler.GeneratedCode("OpenApiClient", "%VERSION%")] - %ACCESS% interface I%CLASS% - { - /// Gets the last status code from the HTTP request. - global::System.Net.HttpStatusCode? GetLastStatusCode(); - - """; - - public const string InterfaceFooter = """ - } - - """; - - public static void AppendInterface(StringBuilder builder, OpenApiContract contract) - { - builder.AppendLine(InterfaceHeader); - - int methodsCount = 0; - - foreach (OpenApiPath path in contract.Paths) - { - if (methodsCount > 0) - { - builder.AppendLine(); - } - - if (path.Summary?.Length > 0) - { - builder.Append(" /// "); - builder.Append(path.Summary); - builder.AppendLine(""); - } - - builder.Append(" global::System.Threading.Tasks.Task<%CLASS%Result"); - - if (path.ResponseType?.Length > 0) - { - builder.Append("<"); - builder.Append(path.ResponseType); - builder.Append(">"); - } - - builder.Append("> "); - builder.Append(path.Name); - builder.Append("("); - - if (path.RequestBodyType?.Length > 0) - { - builder.Append(path.RequestBodyType); - builder.Append(" request, "); - } - - if (path.RequestQueryType?.Length > 0) - { - builder.Append(path.RequestQueryType); - builder.Append(" query, "); - } - - builder.AppendLine("global::System.Threading.CancellationToken cancellationToken);"); - - methodsCount++; - } - - builder.AppendLine(InterfaceFooter); - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Result.cs b/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Result.cs deleted file mode 100644 index 814c35d..0000000 --- a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Result.cs +++ /dev/null @@ -1,116 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Generation; - -internal sealed partial class ClientGenerator -{ - public const string ResultTemplate = """ - /// Represents a result of the API call. - [global::System.CodeDom.Compiler.GeneratedCode("OpenApiClient", "%VERSION%")] - %ACCESS% struct %CLASS%ResultError - { - /// Initializes a new instance of the error struct. - public %CLASS%ResultError(string message) - { - Message = message; - } - - /// Gets the error message. - public string? Message { get; } - } - - /// Represents a result of the API call. - [global::System.CodeDom.Compiler.GeneratedCode("OpenApiClient", "%VERSION%")] - %ACCESS% interface I%CLASS%Result - { - /// Gets a value indicating whether the API call has errors. - bool HasErrors { get; } - - /// Gets a value indicating whether the API call succeeded. - bool IsSucceeded{ get; } - } - - /// Represents a result of the API call. - [global::System.CodeDom.Compiler.GeneratedCode("OpenApiClient", "%VERSION%")] - %ACCESS% class %CLASS%Result : I%CLASS%Result - { - /// Initializes a new instance of the class. - /// The errors of the API call. - /// The status code of the API call. - public %CLASS%Result(%CLASS%ResultError[] errors, global::System.Net.HttpStatusCode? statusCode) - { - Errors = errors; - StatusCode = statusCode; - } - - /// Initializes a new instance of the result class. - /// The status code of the API call. - public %CLASS%Result(global::System.Net.HttpStatusCode? statusCode) : this(new %CLASS%ResultError[0], statusCode) - { - } - - /// Gets the status code of the API call. - public global::System.Net.HttpStatusCode? StatusCode { get; } - - /// Gets the errors of the API call. - public %CLASS%ResultError[] Errors { get; } - - /// - public bool HasErrors - { - get - { - return Errors.Length > 0; - } - } - - /// - public bool IsSucceeded - { - get - { - return !HasErrors; - } - } - } - - /// Represents a result from the API. - [global::System.CodeDom.Compiler.GeneratedCode("OpenApiClient", "%VERSION%")] - %ACCESS% sealed class %CLASS%Result : %CLASS%Result where TResult : class - { - private readonly TResult? _result; - - /// Initializes a new instance of the result class. - /// Result of the API call. - /// The status code of the API call. - public %CLASS%Result(TResult result, global::System.Net.HttpStatusCode? statusCode) : base(statusCode) - { - if (result == null) - { - throw new global::System.ArgumentNullException(nameof(result)); - } - - _result = result; - } - - /// Initializes a new instance of the result class. - /// The errors of the API call. - /// The errors of the API call. - public %CLASS%Result(%CLASS%ResultError[] errors, global::System.Net.HttpStatusCode? statusCode) : base(errors, statusCode) - { - } - - /// Gets the result of the API call. - public TResult Result - { - get - { - return _result ?? throw new global::System.InvalidOperationException("Cannot retrieve API result if errors exist."); - } - } - } - """; -} diff --git a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Serializer.cs b/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Serializer.cs deleted file mode 100644 index 5f9bf2f..0000000 --- a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Serializer.cs +++ /dev/null @@ -1,117 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Contracts; - -namespace OpenApi.Client.SourceGenerators.Generation; - -internal sealed partial class ClientGenerator -{ - private const string SerializerInterfaceTemplate = """ - /// Represents a JSON serializer for the API classes. - [global::System.CodeDom.Compiler.GeneratedCode("OpenApiClient", "%VERSION%")] - public interface IOpenApiJsonSerializer - { - /// Converts the provided value to JSON text. - string Serialize(TInput input); - - /// Reads one JSON value (including objects or arrays). - TOutput Deserialize(string input); - } - - """; - - private const string SystemTextJsonSerializerTemplate = """ - /// Represents a JSON serializer for the API classes. - [global::System.CodeDom.Compiler.GeneratedCode("OpenApiClient", "%VERSION%")] - internal sealed class OpenApiJsonSerializer : IOpenApiJsonSerializer - { - /// Options for the serializer used to create API objects. - private readonly global::System.Text.Json.JsonSerializerOptions JsonSettings; - - public OpenApiJsonSerializer() - { - JsonSettings = new global::System.Text.Json.JsonSerializerOptions - { - PropertyNameCaseInsensitive = true, - Converters = - { - new global::System.Text.Json.Serialization.JsonStringEnumConverter() - } - }; - } - - public OpenApiJsonSerializer(global::System.Text.Json.JsonSerializerOptions jsonSettings) - { - JsonSettings = jsonSettings; - } - - /// - public string Serialize(TInput input) - { - return global::System.Text.Json.JsonSerializer.Serialize(input, JsonSettings); - } - - /// - public TOutput Deserialize(string input) - { - return global::System.Text.Json.JsonSerializer.Deserialize(input, JsonSettings); - } - } - - """; - - private const string NewtonsoftJsonSerializerTemplate = """ - /// Represents a JSON serializer for the API classes. - [global::System.CodeDom.Compiler.GeneratedCode("OpenApiClient", "%VERSION%")] - internal sealed class OpenApiJsonSerializer : IOpenApiJsonSerializer - { - private readonly global::Newtonsoft.Json.JsonSerializerSettings JsonSettings; - - public OpenApiJsonSerializer() - { - JsonSettings = new global::Newtonsoft.Json.JsonSerializerSettings - { - Converters = - { - new global::Newtonsoft.Json.Converters.StringEnumConverter() - } - }; - } - - public OpenApiJsonSerializer(global::Newtonsoft.Json.JsonSerializerSettings jsonSettings) - { - JsonSettings = jsonSettings; - } - - /// - public string Serialize(TInput input) - { - return global::Newtonsoft.Json.JsonConvert.SerializeObject(input); - } - - /// - public TOutput Deserialize(string input) - { - return global::Newtonsoft.Json.JsonConvert.DeserializeObject(input); - } - } - - """; - - public static void AppendSerializer( - StringBuilder builder, - OpenApiContract contract, - ClientGeneratorSerializer serializer - ) - { - builder.AppendLine(SerializerInterfaceTemplate); - builder.AppendLine( - serializer == ClientGeneratorSerializer.SystemTextJson - ? SystemTextJsonSerializerTemplate - : NewtonsoftJsonSerializerTemplate - ); - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Types.cs b/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Types.cs deleted file mode 100644 index 96b99d0..0000000 --- a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.Types.cs +++ /dev/null @@ -1,56 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Contracts; - -namespace OpenApi.Client.SourceGenerators.Generation; - -internal sealed partial class ClientGenerator -{ - public static void AppendTypes(StringBuilder builder, OpenApiContract contract) - { - if (contract.Types.Count > 0) - { - builder.AppendLine(); - } - - int typesCount = 0; - - foreach (OpenApiType type in contract.Types) - { - if (typesCount > 0) - { - builder.AppendLine(); - } - - if (type.Summary?.Length > 0) - { - builder.Append(" /// "); - builder.Append(type.Summary); - builder.AppendLine(""); - } - - builder.AppendLine( - " [global::System.CodeDom.Compiler.GeneratedCode(\"OpenApiClient\", \"%VERSION%\")]" - ); - builder.Append(" public sealed class "); - builder.AppendLine(type.Name); - builder.AppendLine(" {"); - - foreach (KeyValuePair property in type.Properties) - { - builder.Append(" public "); - builder.Append(property.Value); // Type - builder.Append(" "); - builder.Append(property.Key); // Name - builder.AppendLine(" { get; set; }"); - } - - builder.AppendLine(" }"); - - typesCount++; - } - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.cs b/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.cs deleted file mode 100644 index b3db9e4..0000000 --- a/src/OpenApi.Client.SourceGenerators/Generation/ClientGenerator.cs +++ /dev/null @@ -1,68 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Contracts; - -namespace OpenApi.Client.SourceGenerators.Generation; - -internal sealed partial class ClientGenerator( - OpenApiContract contract, - ClientGeneratorSerializer serializer -) -{ - public const string GeneratorVersion = "1.0.0"; - - public static readonly string[] Placeholders = ["%CLASS%", "%TITLE%", "%ACCESS%", "%VERSION%"]; - - public const string DocumentPrefix = """ - // - // Generated with Open API Client Source Generator. Created by Leszek Pomianowski and OpenAPI Client Contributors. - #pragma warning disable - #nullable enable - """; - - public GenerationResult Generate() - { - StringBuilder builder = new(DocumentPrefix); - - builder.AppendLine(); - builder.Append("namespace "); - builder.AppendLine(contract.Namespace); - builder.AppendLine("{"); - - builder.AppendLine(ResultTemplate); - builder.AppendLine(); - - AppendInterface(builder, contract); - AppendClass(builder, contract, serializer); - AppendAttributes(builder, contract); - AppendSerializer(builder, contract, serializer); - AppendTypes(builder, contract); - - builder.AppendLine("}"); - - builder.Replace("%CLASS%", contract.ClassName); - builder.Replace("%TITLE%", RemoveUnsafeWords(contract.Title)); - builder.Replace("%ACCESS%", contract.Access); - builder.Replace("%VERSION%", GeneratorVersion); - - return builder.ToString(); - } - - private static string? RemoveUnsafeWords(string? input) - { - if (input is null) - { - return null; - } - - foreach (string placeholder in ClientGenerator.Placeholders) - { - input = input.Replace(placeholder, string.Empty); - } - - return input; - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Generation/GenerationResult.cs b/src/OpenApi.Client.SourceGenerators/Generation/GenerationResult.cs deleted file mode 100644 index 8094020..0000000 --- a/src/OpenApi.Client.SourceGenerators/Generation/GenerationResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Generation; - -public sealed class GenerationResult -{ - public GenerationResult(params GenerationResultError[] errors) - { - Result = default; - Errors = errors; - } - - public GenerationResult(TResult? result) - { - Result = result; - Errors = Array.Empty(); - } - - public TResult? Result { get; } - - public GenerationResultError[] Errors { get; } - - public bool HasErrors => Errors.Length > 0; - - public static implicit operator GenerationResult(GenerationResultError error) - { - return new GenerationResult(error); - } - - public static implicit operator GenerationResult(TResult? result) - { - return new GenerationResult(result); - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Generation/GenerationResultError.cs b/src/OpenApi.Client.SourceGenerators/Generation/GenerationResultError.cs deleted file mode 100644 index 2186589..0000000 --- a/src/OpenApi.Client.SourceGenerators/Generation/GenerationResultError.cs +++ /dev/null @@ -1,8 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Generation; - -public readonly record struct GenerationResultError(string Message); diff --git a/src/OpenApi.Client.SourceGenerators/GlobalUsings.cs b/src/OpenApi.Client.SourceGenerators/GlobalUsings.cs new file mode 100644 index 0000000..29e66e8 --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/GlobalUsings.cs @@ -0,0 +1,20 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +global using System; +global using System.Buffers; +global using System.Collections; +global using System.Collections.Generic; +global using System.Collections.Immutable; +global using System.IO; +global using System.Linq; +global using System.Net.Http; +global using System.Runtime.CompilerServices; +global using System.Text; +global using System.Threading; +global using System.Threading.Tasks; +global using Microsoft.CodeAnalysis; +global using Microsoft.CodeAnalysis.CSharp; +global using Microsoft.CodeAnalysis.CSharp.Syntax; diff --git a/src/OpenApi.Client.SourceGenerators/Helpers/ImmutableArrayBuilder{T}.cs b/src/OpenApi.Client.SourceGenerators/Helpers/ImmutableArrayBuilder{T}.cs deleted file mode 100644 index ed742b4..0000000 --- a/src/OpenApi.Client.SourceGenerators/Helpers/ImmutableArrayBuilder{T}.cs +++ /dev/null @@ -1,268 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// This file is ported and adapted from ComputeSharp (Sergio0694/ComputeSharp), -// more info in ThirdPartyNotices.txt in the root of the project. - -using System.Buffers; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; - -namespace OpenApi.Client.SourceGenerators.Helpers; - -/// -/// A helper type to build sequences of values with pooled buffers. -/// -/// The type of items to create sequences for. -internal ref struct ImmutableArrayBuilder -{ - /// - /// The rented instance to use. - /// - private Writer? writer; - - /// - /// Creates a value with a pooled underlying data writer. - /// - /// A instance to write data to. - public static ImmutableArrayBuilder Rent() - { - return new(new Writer()); - } - - /// - /// Creates a new object with the specified parameters. - /// - /// The target data writer to use. - private ImmutableArrayBuilder(Writer writer) - { - this.writer = writer; - } - - /// - public readonly int Count - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => this.writer!.Count; - } - - /// - /// Gets the data written to the underlying buffer so far, as a . - /// - [UnscopedRef] - public readonly ReadOnlySpan WrittenSpan - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => this.writer!.WrittenSpan; - } - - /// - public readonly void Add(T item) - { - this.writer!.Add(item); - } - - /// - /// Adds the specified items to the end of the array. - /// - /// The items to add at the end of the array. - public readonly void AddRange(scoped ReadOnlySpan items) - { - this.writer!.AddRange(items); - } - - /// - public readonly ImmutableArray ToImmutable() - { - T[] array = this.writer!.WrittenSpan.ToArray(); - - return Unsafe.As>(ref array); - } - - /// - public readonly T[] ToArray() - { - return this.writer!.WrittenSpan.ToArray(); - } - - /// - /// Gets an instance for the current builder. - /// - /// An instance for the current builder. - /// - /// The builder should not be mutated while an enumerator is in use. - /// - public readonly IEnumerable AsEnumerable() - { - return this.writer!; - } - - /// - public override readonly string ToString() - { - return this.writer!.WrittenSpan.ToString(); - } - - /// - public void Dispose() - { - Writer? writer = this.writer; - - this.writer = null; - - writer?.Dispose(); - } - - /// - /// A class handling the actual buffer writing. - /// - private sealed class Writer : ICollection, IDisposable - { - /// - /// The underlying array. - /// - private T?[]? array; - - /// - /// The starting offset within . - /// - private int index; - - /// - /// Creates a new instance with the specified parameters. - /// - public Writer() - { - this.array = ArrayPool.Shared.Rent(typeof(T) == typeof(char) ? 1024 : 8); - this.index = 0; - } - - /// - public int Count - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => this.index; - } - - /// - public ReadOnlySpan WrittenSpan - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => new(this.array!, 0, this.index); - } - - /// - bool ICollection.IsReadOnly => true; - - /// - public void Add(T value) - { - EnsureCapacity(1); - - this.array![this.index++] = value; - } - - /// - public void AddRange(ReadOnlySpan items) - { - EnsureCapacity(items.Length); - - items.CopyTo(this.array.AsSpan(this.index)!); - - this.index += items.Length; - } - - /// - public void Dispose() - { - T?[]? array = this.array; - - this.array = null; - - if (array is not null) - { - ArrayPool.Shared.Return(array, clearArray: typeof(T) != typeof(char)); - } - } - - /// - void ICollection.Clear() - { - throw new NotSupportedException(); - } - - /// - bool ICollection.Contains(T item) - { - throw new NotSupportedException(); - } - - /// - void ICollection.CopyTo(T[] array, int arrayIndex) - { - Array.Copy(this.array!, 0, array, arrayIndex, this.index); - } - - /// - IEnumerator IEnumerable.GetEnumerator() - { - T?[] array = this.array!; - int length = this.index; - - for (int i = 0; i < length; i++) - { - yield return array[i]!; - } - } - - /// - IEnumerator IEnumerable.GetEnumerator() - { - return ((IEnumerable)this).GetEnumerator(); - } - - /// - bool ICollection.Remove(T item) - { - throw new NotSupportedException(); - } - - /// - /// Ensures that has enough free space to contain a given number of new items. - /// - /// The minimum number of items to ensure space for in . - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private void EnsureCapacity(int requestedSize) - { - if (requestedSize > this.array!.Length - this.index) - { - ResizeBuffer(requestedSize); - } - } - - /// - /// Resizes to ensure it can fit the specified number of new items. - /// - /// The minimum number of items to ensure space for in . - [MethodImpl(MethodImplOptions.NoInlining)] - private void ResizeBuffer(int sizeHint) - { - int minimumSize = this.index + sizeHint; - - T?[] oldArray = this.array!; - T?[] newArray = ArrayPool.Shared.Rent(minimumSize); - - Array.Copy(oldArray, newArray, this.index); - - this.array = newArray; - - ArrayPool.Shared.Return(oldArray, clearArray: typeof(T) != typeof(char)); - } - } -} diff --git a/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.csproj b/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.csproj new file mode 100644 index 0000000..054dcc1 --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.csproj @@ -0,0 +1,71 @@ + + + true + netstandard2.0 + false + true + $(NoWarn);CS1591 + + + + + System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute; + System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute; + System.Diagnostics.CodeAnalysis.MemberNotNullAttribute; + System.Diagnostics.CodeAnalysis.NotNullAttribute; + System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute; + System.Diagnostics.CodeAnalysis.NotNullWhenAttribute; + System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute; + System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute; + System.Diagnostics.CodeAnalysis.SetsRequiredMembersAttribute; + System.Runtime.CompilerServices.CallerArgumentExpressionAttribute; + System.Runtime.CompilerServices.SkipLocalsInitAttribute; + System.Runtime.CompilerServices.IsExternalInit; + System.Runtime.CompilerServices.RequiredMemberAttribute; + System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.projitems b/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.projitems deleted file mode 100644 index 8d5ee84..0000000 --- a/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.projitems +++ /dev/null @@ -1,69 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - 5e7f1212-a54b-40ca-98c5-1ff5cd1a1638 - - - OpenApi.Client.SourceGenerators - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.props b/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.props deleted file mode 100644 index 57057eb..0000000 --- a/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.props +++ /dev/null @@ -1,51 +0,0 @@ - - - - netstandard2.0 - false - true - $(NoWarn);CS1591 - - - - - - - $(MSBuildProjectName.Substring(0, $([MSBuild]::Subtract($(MSBuildProjectName.Length), 10)))) - - - $(MSBuildProjectName.Substring($([MSBuild]::Subtract($(MSBuildProjectName.Length), 3)), 1)) - $(MSBuildProjectName.Substring($([MSBuild]::Subtract($(MSBuildProjectName.Length), 2)), 1)) - $(MSBuildProjectName.Substring($([MSBuild]::Subtract($(MSBuildProjectName.Length), 1)), 1)) - $(OpenApiClientSourceGeneratorRoslynMajorVersion).$(OpenApiClientSourceGeneratorRoslynMinorVersion).$(OpenApiClientSourceGeneratorRoslynPatchVersion) - - - $(DefineConstants);ROSLYN_4_3_1_OR_GREATER - - - - - - - - - - - - - - - - - - diff --git a/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.shproj b/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.shproj deleted file mode 100644 index 48a81c2..0000000 --- a/src/OpenApi.Client.SourceGenerators/OpenApi.Client.SourceGenerators.shproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - 5e7f1212-a54b-40ca-98c5-1ff5cd1a1638 - 14.0 - - - - - - - - diff --git a/src/OpenApi.Client.SourceGenerators/OpenApiClient.targets b/src/OpenApi.Client.SourceGenerators/OpenApiClient.targets new file mode 100644 index 0000000..24ec2d0 --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/OpenApiClient.targets @@ -0,0 +1,136 @@ + + + + + <_OpenApiClientAnalyzer + Include="@(Analyzer)" + Condition="'%(Analyzer.NuGetPackageId)' == 'OpenApi.Client'" + /> + + + + + + + + + + + + + + + + + @(OpenApiClientCurrentCompilerAssemblyIdentity->'%(Version)') + + true + + + + + + + + + + + + + + + + + + + + true + + + + + + + + true + + + + + + + + + + + + + + + + + + $([System.Text.RegularExpressions.Regex]::Replace($(OpenApiClientExcludeGeneratedTypes.Replace(';', ',')), '[\r\n]', '')) + $([System.Text.RegularExpressions.Regex]::Replace($(OpenApiClientIncludeGeneratedTypes.Replace(';', ',')), '[\r\n]', '')) + + + diff --git a/src/OpenApi.Client.SourceGenerators/OpenApiClientGeneration.cs b/src/OpenApi.Client.SourceGenerators/OpenApiClientGeneration.cs new file mode 100644 index 0000000..9a5e5eb --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/OpenApiClientGeneration.cs @@ -0,0 +1,109 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +namespace OpenApi.Client.SourceGenerators; + +internal sealed class OpenApiClientGeneration +{ + /// + /// The name of the generator (package) used to generate Open API Clients. + /// + public const string GeneratorName = "OpenApiClient"; + + /// + /// File header for generated Open API Client source files. + /// + public const string Header = """ + // + // Generated with Open API Client Source Generator. Created by Leszek Pomianowski and OpenAPI Client Contributors. + // Based on the OpenAPI specification and .NET Foundation guidelines. + // See: https://github.com/lepoco/openapi.client + #pragma warning disable + #nullable enable + + """; + + /// + /// The name of the marker attribute used to indicate that a class should have an Open API Client generated for it. + /// + public const string MarkerAttributeName = $"{GeneratorName}Attribute"; + + /// + /// The source code for the marker attribute that indicates a class should have an Open API Client generated for it. + /// + public const string MarkerAttributeSource = + // language=cs + $$$""" + {{{Header}}} + namespace OpenApi.Client + { + /// Library which API client should use at runtime. + [global::System.CodeDom.Compiler.GeneratedCode("{{{GeneratorName}}}", "1.0.0")] + internal enum OpenApiClientSerialization + { + SystemTextJson, + NewtonsoftJson + } + + /// Indicates that a given class should have an Open API Client generated for it. + /// Generated with Open API Client Source Generator. See: + [global::System.CodeDom.Compiler.GeneratedCode("{{{GeneratorName}}}", "1.0.0")] + [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + internal sealed class {{{MarkerAttributeName}}} : global::System.Attribute + { + /// Initializes a new instance of the class. + /// The specification resource name for the Open API Client. + /// The specification is the name of the resource which is a yaml or json open api code. + public {{{MarkerAttributeName}}}(string specification) + { + Specification = specification; + Serialization = OpenApiClientSerialization.SystemTextJson; + Templates = null; + } + + /// Initializes a new instance of the class. + /// The specification resource name for the Open API Client. + /// A flag indicating whether to use the Service Collection for the Open API Client. + /// The specification is the name of the resource which is a yaml or json open api code. + public {{{MarkerAttributeName}}}(string specification, OpenApiClientSerialization serializationTool) + { + Specification = specification; + Serialization = serializationTool; + Templates = null; + } + + /// Initializes a new instance of the class. + /// The specification resource name for the Open API Client. + /// A flag indicating whether to use the Service Collection for the Open API Client. + /// Directory relative to specification file in which the templates are located. + /// The specification is the name of the resource which is a yaml or json open api code. + public {{{MarkerAttributeName}}}(string specification, OpenApiClientSerialization serializationTool, string templates) + { + Specification = specification; + Serialization = serializationTool; + Templates = templates; + } + + /// The specification URL for the Open API Client. + public string Specification { get; } + + /// A flag indicating whether to use the Service Collection for the Open API Client. + public OpenApiClientSerialization Serialization { get; } + + /// Directory relative to specification file in which the templates are located. + public string? Templates { get; set; } + + /// List of operations to include in the Open API Client. + public string? Operations { get; set; } + + /// Whether the generated classes should use records. + public bool UseRecords { get; set; } = true; + + /// Whether the generated properties should use nullable reference types. + public bool Nullable { get; set; } = true; + } + } + """; +} diff --git a/src/OpenApi.Client.SourceGenerators/OpenApiClientGenerationHelper.cs b/src/OpenApi.Client.SourceGenerators/OpenApiClientGenerationHelper.cs deleted file mode 100644 index 6d9a6a1..0000000 --- a/src/OpenApi.Client.SourceGenerators/OpenApiClientGenerationHelper.cs +++ /dev/null @@ -1,56 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators; - -internal static class OpenApiClientGenerationHelper -{ - public const string Attribute = """ - // - // Generated with Open API Client Source Generator. Created by Leszek Pomianowski and OpenAPI Client Contributors. - #pragma warning disable - #nullable enable - namespace OpenApi.Client - { - /// Library which API client should use at runtime. - internal enum OpenApiClientSerialization - { - SystemTextJson, - NewtonsoftJson - } - - /// Indicates that a given class should have an Open API Client generated for it. - /// Generated with Open API Client Source Generator. See: - [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false, Inherited = false)] - internal sealed class OpenApiClientAttribute : global::System.Attribute - { - /// Initializes a new instance of the class. - /// The specification resource name for the Open API Client. - /// The specification is the name of the resource which is a yaml or json open api code. - public OpenApiClientAttribute(string specification) - { - Specification = specification; - Serialization = OpenApiClientSerialization.SystemTextJson; - } - - /// Initializes a new instance of the class. - /// The specification resource name for the Open API Client. - /// A flag indicating whether to use the Service Collection for the Open API Client. - /// The specification is the name of the resource which is a yaml or json open api code. - public OpenApiClientAttribute(string specification, OpenApiClientSerialization serializationTool) - { - Specification = specification; - Serialization = serializationTool; - } - - /// The specification URL for the Open API Client. - public string Specification { get; } - - /// A flag indicating whether to use the Service Collection for the Open API Client. - public OpenApiClientSerialization Serialization { get; } - } - } - """; -} diff --git a/src/OpenApi.Client.SourceGenerators/OpenApiClientGenerator.Execute.cs b/src/OpenApi.Client.SourceGenerators/OpenApiClientGenerator.Execute.cs deleted file mode 100644 index 3b69dc9..0000000 --- a/src/OpenApi.Client.SourceGenerators/OpenApiClientGenerator.Execute.cs +++ /dev/null @@ -1,196 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.Text; -using OpenApi.Client.SourceGenerators.Contracts; -using OpenApi.Client.SourceGenerators.Diagnostics; -using OpenApi.Client.SourceGenerators.Generation; -using OpenApi.Client.SourceGenerators.Serialization; - -namespace OpenApi.Client.SourceGenerators; - -public partial class OpenApiClientGenerator -{ - private static void Execute( - SourceProductionContext spc, - ( - RequestedClassToGenerate? Contract, - ImmutableArray<(string Name, string Contents)> Files - ) compilationAndFiles - ) - { - if (compilationAndFiles.Contract is null) - { - return; - } - - string? additionalFileContents = null; - - foreach ((string Name, string Contents) file in compilationAndFiles.Files) - { - if ( - compilationAndFiles.Contract.SelectedFile.Equals( - file.Name, - StringComparison.OrdinalIgnoreCase - ) - ) - { - additionalFileContents = file.Contents; - break; - } - } - - if (additionalFileContents is null) - { - spc.ReportDiagnostic( - Diagnostic.Create( - DiagnosticDescriptors.DocumentMissing, - compilationAndFiles.Contract.Location ?? Location.None, - compilationAndFiles.Contract.SelectedFile - ) - ); - - return; - } - - if (additionalFileContents.Length == 0) - { - spc.ReportDiagnostic( - Diagnostic.Create( - DiagnosticDescriptors.DocumentEmpty, - compilationAndFiles.Contract.Location ?? Location.None, - compilationAndFiles.Contract.SelectedFile - ) - ); - - return; - } - - SerializationResult? serializationResult = - new OpenApiSerializer().Deserialize( - compilationAndFiles.Contract.SelectedFile, - additionalFileContents - ); - - if (serializationResult?.HasErrors ?? false) - { - foreach (SerializationResultError error in serializationResult.Errors) - { - spc.ReportDiagnostic( - Diagnostic.Create( - DiagnosticDescriptors.DocumentDeserializationFailed, - compilationAndFiles.Contract.Location ?? Location.None, - compilationAndFiles.Contract.SelectedFile, - error.Message - ) - ); - } - - return; - } - - if (serializationResult?.Result is null) - { - spc.ReportDiagnostic( - Diagnostic.Create( - DiagnosticDescriptors.GenerationFailed, - compilationAndFiles.Contract.Location ?? Location.None, - compilationAndFiles.Contract.SelectedFile, - "Serializer returned empty contract" - ) - ); - - return; - } - - string? generatedSource = null; - - OpenApiContract contract = OpenApiContractParser.Parse( - compilationAndFiles.Contract.NamespaceName, - compilationAndFiles.Contract.ClassName, - compilationAndFiles.Contract.Access, - serializationResult.Result - ); - - if (contract.Paths.Count == 0) - { - spc.ReportDiagnostic( - Diagnostic.Create( - DiagnosticDescriptors.MissingPaths, - compilationAndFiles.Contract.Location ?? Location.None, - compilationAndFiles.Contract.SelectedFile - ) - ); - - return; - } - - try - { - ClientGenerator generator = - new( - contract, - compilationAndFiles.Contract.SerializationTool switch - { - RequestedSerializationTool.NewtonsoftJson - => ClientGeneratorSerializer.NewtonsoftJson, - _ => ClientGeneratorSerializer.SystemTextJson - } - ); - GenerationResult generatorResult = generator.Generate(); - - if (generatorResult.HasErrors) - { - foreach (SerializationResultError error in serializationResult.Errors) - { - spc.ReportDiagnostic( - Diagnostic.Create( - DiagnosticDescriptors.GenerationFailed, - compilationAndFiles.Contract.Location ?? Location.None, - compilationAndFiles.Contract.SelectedFile, - error.Message - ) - ); - } - - return; - } - - generatedSource = generatorResult.Result; - } - catch (Exception e) - { - spc.ReportDiagnostic( - Diagnostic.Create( - DiagnosticDescriptors.GenerationFailed, - compilationAndFiles.Contract.Location ?? Location.None, - compilationAndFiles.Contract.SelectedFile, - e.Message - ) - ); - - return; - } - - if (generatedSource is null) - { - spc.ReportDiagnostic( - Diagnostic.Create( - DiagnosticDescriptors.GeneratedSourceEmpty, - compilationAndFiles.Contract.Location ?? Location.None, - compilationAndFiles.Contract.SelectedFile - ) - ); - - return; - } - - spc.AddSource( - $"{compilationAndFiles.Contract.ClassName}.g.cs", - SourceText.From(generatedSource, Encoding.UTF8) - ); - } -} diff --git a/src/OpenApi.Client.SourceGenerators/OpenApiClientGenerator.cs b/src/OpenApi.Client.SourceGenerators/OpenApiClientGenerator.cs index bc1891c..8406ad1 100644 --- a/src/OpenApi.Client.SourceGenerators/OpenApiClientGenerator.cs +++ b/src/OpenApi.Client.SourceGenerators/OpenApiClientGenerator.cs @@ -3,7 +3,9 @@ // Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. // All Rights Reserved. -using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Text; +using OpenApi.Client.SourceGenerators.Client; +using OpenApi.Client.SourceGenerators.Diagnostics; namespace OpenApi.Client.SourceGenerators; @@ -11,18 +13,19 @@ namespace OpenApi.Client.SourceGenerators; /// Generator for Open API Clients. /// [Generator] -public partial class OpenApiClientGenerator : IIncrementalGenerator +public sealed class OpenApiClientGenerator : IIncrementalGenerator { - private const string MarkerAttributeName = "OpenApiClientAttribute"; - /// public void Initialize(IncrementalGeneratorInitializationContext context) { - const string searchedAttribute = $"OpenApi.Client.{MarkerAttributeName}"; + const string searchedAttribute = $"OpenApi.Client.{OpenApiClientGeneration.MarkerAttributeName}"; context.RegisterPostInitializationOutput(i => { - i.AddSource($"{MarkerAttributeName}.g.cs", OpenApiClientGenerationHelper.Attribute); + i.AddSource( + $"{OpenApiClientGeneration.MarkerAttributeName}.g.cs", + OpenApiClientGeneration.MarkerAttributeSource + ); }); IncrementalValueProvider> additionalFiles = context @@ -33,13 +36,13 @@ public void Initialize(IncrementalGeneratorInitializationContext context) (additionalText, cancellationToken) => ( Path.GetFileNameWithoutExtension(additionalText.Path).ToLower(), - additionalText.GetText(cancellationToken)!.ToString() + additionalText.GetText(cancellationToken)!.ToString() // stream ) ) .Where(text => text.Item1 is not null && text.Item2 is not null)! .Collect(); - IncrementalValuesProvider classInfos = context + IncrementalValuesProvider classInfos = context .SyntaxProvider.ForAttributeWithMetadataName( searchedAttribute, predicate: static (s, _) => true, @@ -50,7 +53,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) context.RegisterSourceOutput(classInfos.Combine(additionalFiles), Execute); } - private static RequestedClassToGenerate? ComputeClassForGeneration( + private static SourceGeneratorMetadata? ComputeClassForGeneration( GeneratorAttributeSyntaxContext syntaxContext, CancellationToken cancellationToken ) @@ -65,12 +68,12 @@ is not INamedTypeSymbol namedSymbol string specification = string.Empty; Location? location = null; - RequestedSerializationTool serializationTool = RequestedSerializationTool.SystemTextJson; + SerializationTool serializationTool = SerializationTool.SystemTextJson; ImmutableArray attributes = namedSymbol.GetAttributes(); foreach (AttributeData attribute in attributes) { - if (attribute.AttributeClass?.Name != MarkerAttributeName) + if (attribute.AttributeClass?.Name != OpenApiClientGeneration.MarkerAttributeName) { continue; } @@ -91,29 +94,151 @@ is not INamedTypeSymbol namedSymbol if (((int?)useDependencyInjectionArgument.Value ?? 0) == 1) { - serializationTool = RequestedSerializationTool.NewtonsoftJson; + serializationTool = SerializationTool.NewtonsoftJson; } } } - return new RequestedClassToGenerate + return new SourceGeneratorMetadata { NamespaceName = namedSymbol.ContainingNamespace.ToString(), ClassName = namedSymbol.Name, SelectedFile = specification.ToLower(), SerializationTool = serializationTool, Access = namedSymbol.DeclaredAccessibility, - Location = location + Location = location, + Templates = null, }; } - private enum RequestedSerializationTool + private static void Execute( + SourceProductionContext spc, + ( + SourceGeneratorMetadata? GeneratorData, + ImmutableArray<(string Name, string Contents)> Files + ) compilationAndFiles + ) { - SystemTextJson, - NewtonsoftJson + if (compilationAndFiles.GeneratorData is null) + { + return; + } + + string? additionalFileContents = null; + + foreach ((string Name, string Contents) file in compilationAndFiles.Files) + { + if ( + compilationAndFiles.GeneratorData.SelectedFile.Equals( + file.Name, + StringComparison.OrdinalIgnoreCase + ) + || compilationAndFiles.GeneratorData.SelectedFile.Equals( + $"{file.Name}.json", + StringComparison.OrdinalIgnoreCase + ) + ) + { + additionalFileContents = file.Contents; + break; + } + } + + if (additionalFileContents is null) + { + spc.ReportDiagnostic( + Diagnostic.Create( + DiagnosticDescriptors.DocumentMissing, + compilationAndFiles.GeneratorData.Location ?? Location.None, + compilationAndFiles.GeneratorData.SelectedFile + ) + ); + + return; + } + + if (additionalFileContents.Length == 0) + { + spc.ReportDiagnostic( + Diagnostic.Create( + DiagnosticDescriptors.DocumentEmpty, + compilationAndFiles.GeneratorData.Location ?? Location.None, + compilationAndFiles.GeneratorData.SelectedFile + ) + ); + + return; + } + + ClientGenerator generator = new( + new GeneratorData + { + Contents = additionalFileContents, + Access = compilationAndFiles.GeneratorData.Access, + ClassName = compilationAndFiles.GeneratorData.ClassName, + NamespaceName = compilationAndFiles.GeneratorData.NamespaceName, + SerializationTool = compilationAndFiles.GeneratorData.SerializationTool, + Templates = compilationAndFiles.GeneratorData.Templates, + } + ); + + GenerationResult generatorResult; + + try + { + generatorResult = generator.Generate(); + + if (generatorResult.HasErrors) + { + foreach (GenerationError? error in generatorResult.Errors) + { + spc.ReportDiagnostic( + Diagnostic.Create( + DiagnosticDescriptors.GenerationFailed, + compilationAndFiles.GeneratorData.Location ?? Location.None, + compilationAndFiles.GeneratorData.SelectedFile, + error.Message + ) + ); + } + + return; + } + } + catch (Exception e) + { + spc.ReportDiagnostic( + Diagnostic.Create( + DiagnosticDescriptors.GenerationFailed, + compilationAndFiles.GeneratorData.Location ?? Location.None, + compilationAndFiles.GeneratorData.SelectedFile, + e.Message + ) + ); + + return; + } + + if (generatorResult.GeneratedClient is null) + { + spc.ReportDiagnostic( + Diagnostic.Create( + DiagnosticDescriptors.GeneratedSourceEmpty, + compilationAndFiles.GeneratorData.Location ?? Location.None, + compilationAndFiles.GeneratorData.SelectedFile + ) + ); + + return; + } + + spc.AddSource( + $"{compilationAndFiles.GeneratorData.ClassName}.g.cs", + SourceText.From(generatorResult.GeneratedClient, Encoding.UTF8) + ); } - private sealed class RequestedClassToGenerate + private sealed record SourceGeneratorMetadata { public required string NamespaceName { get; init; } @@ -123,8 +248,16 @@ private sealed class RequestedClassToGenerate public required Accessibility Access { get; init; } - public required RequestedSerializationTool SerializationTool { get; init; } + public required SerializationTool SerializationTool { get; init; } public required Location? Location { get; init; } + + public required string? Templates { get; init; } + + public string[] Operations { get; init; } = []; + + public bool UseRecords { get; init; } = true; + + public bool Nullable { get; init; } = true; } } diff --git a/src/OpenApi.Client.SourceGenerators/Polyfills/GeneratorAttributeSyntaxContext.cs b/src/OpenApi.Client.SourceGenerators/Polyfills/GeneratorAttributeSyntaxContext.cs deleted file mode 100644 index c32d55c..0000000 --- a/src/OpenApi.Client.SourceGenerators/Polyfills/GeneratorAttributeSyntaxContext.cs +++ /dev/null @@ -1,67 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#if !ROSLYN_4_3_1_OR_GREATER - -using System.Collections.Immutable; - -namespace Microsoft.CodeAnalysis; - -/// -/// A type containing information for a match from . -/// -internal readonly struct GeneratorAttributeSyntaxContext -{ - /// - /// Creates a new instance with the specified parameters. - /// - /// The syntax node the attribute is attached to. - /// The symbol that the attribute is attached to. - /// Semantic model for the file that is contained within. - /// The collection of matching attributes. - internal GeneratorAttributeSyntaxContext( - SyntaxNode targetNode, - ISymbol targetSymbol, - SemanticModel semanticModel, - ImmutableArray attributes - ) - { - TargetNode = targetNode; - TargetSymbol = targetSymbol; - SemanticModel = semanticModel; - Attributes = attributes; - } - - /// - /// The syntax node the attribute is attached to. For example, with [CLSCompliant] class C { } this would the class declaration node. - /// - public SyntaxNode TargetNode { get; } - - /// - /// The symbol that the attribute is attached to. For example, with [CLSCompliant] class C { } this would be the for "C". - /// - public ISymbol TargetSymbol { get; } - - /// - /// Semantic model for the file that is contained within. - /// - public SemanticModel SemanticModel { get; } - - /// - /// s for any matching attributes on . Always non-empty. All - /// these attributes will have an whose fully qualified name metadata - /// name matches the name requested in . - /// - /// To get the entire list of attributes, use on . - /// - /// - public ImmutableArray Attributes { get; } -} - -#endif diff --git a/src/OpenApi.Client.SourceGenerators/Polyfills/SyntaxValueProviderExtensions.cs b/src/OpenApi.Client.SourceGenerators/Polyfills/SyntaxValueProviderExtensions.cs deleted file mode 100644 index 0262552..0000000 --- a/src/OpenApi.Client.SourceGenerators/Polyfills/SyntaxValueProviderExtensions.cs +++ /dev/null @@ -1,110 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#if !ROSLYN_4_3_1_OR_GREATER - -using OpenApi.Client.SourceGenerators.Extensions; -using System; -using System.Collections.Immutable; -using System.Threading; - -namespace Microsoft.CodeAnalysis; - -/// -/// Extension methods for the type. -/// -internal static class SyntaxValueProviderExtensions -{ - /// - /// Creates an that can provide a transform over all s if that node has an attribute on it that binds to a with the - /// same fully-qualified metadata as the provided . should be the fully-qualified, metadata name of the attribute, including the - /// Attribute suffix. For example "System.CLSCompliantAttribute for . - /// - /// The source instance to use. - /// The fully qualified metadata name of the attribute to look for. - /// A function that determines if the given attribute target () should be transformed. Nodes that do not pass this - /// predicate will not have their attributes looked at at all. - /// A function that performs the transform. This will only be passed nodes that return for and which have a matching whose - /// has the same fully qualified, metadata name as . - public static IncrementalValuesProvider ForAttributeWithMetadataName( - this SyntaxValueProvider syntaxValueProvider, - string fullyQualifiedMetadataName, - Func predicate, - Func transform - ) - { - return syntaxValueProvider - .CreateSyntaxProvider( - predicate, - (context, token) => - { - ISymbol? symbol = context.SemanticModel.GetDeclaredSymbol(context.Node, token); - - if (symbol is null) - { - return null; - } - - // Skip symbols without the target attribute - if ( - !symbol.TryGetAttributeWithFullyQualifiedMetadataName( - fullyQualifiedMetadataName, - out AttributeData? attributeData - ) - ) - { - return null; - } - - // Edge case: if the symbol is a partial method, skip the implementation part and only process the partial method - // definition. This is needed because attributes will be reported as available on both the definition and the - // implementation part. To avoid generating duplicate files, we only give priority to the definition part. - // On Roslyn 4.3+, ForAttributeWithMetadataName will already only return the symbol the attribute was located on. - if ( - symbol is IMethodSymbol - { - IsPartialDefinition: false, - PartialDefinitionPart: not null - } - ) - { - return null; - } - - // Create the GeneratorAttributeSyntaxContext value to pass to the input transform. The attributes array - // will only ever have a single value, but that's fine with the attributes the various generators look for. - GeneratorAttributeSyntaxContext syntaxContext = - new( - targetNode: context.Node, - targetSymbol: symbol, - semanticModel: context.SemanticModel, - attributes: ImmutableArray.Create(attributeData) - ); - - return new Option(transform(syntaxContext, token)); - } - ) - .Where(static item => item is not null) - .Select(static (item, _) => item!.Value)!; - } - - /// - /// A simple record to wrap a value that might be missing. - /// - /// The type of values to wrap - /// The wrapped value, if it exists. - private sealed record Option(T? Value); -} - -#endif diff --git a/src/OpenApi.Client.SourceGenerators/Readers/CustomOpenApiJsonReader.cs b/src/OpenApi.Client.SourceGenerators/Readers/CustomOpenApiJsonReader.cs new file mode 100644 index 0000000..2f0ede5 --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/Readers/CustomOpenApiJsonReader.cs @@ -0,0 +1,245 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +using Microsoft.OpenApi; +using Microsoft.OpenApi.Reader; +using System.Text.Json; +using System.Text.Json.Nodes; + +namespace OpenApi.Client.SourceGenerators.Readers; + +/// +/// Based on +/// +internal class CustomOpenApiJsonReader : IOpenApiReader +{ + private static readonly JsonDocumentOptions JsonDocumentOptions = new() + { + AllowTrailingCommas = true, + CommentHandling = JsonCommentHandling.Skip, + }; + + private static readonly JsonNodeOptions JsonNodeOptions = new() { PropertyNameCaseInsensitive = true }; + + /// + /// Reads the memory stream input and parses it into an Open API document. + /// + /// Memory stream containing OpenAPI description to parse. + /// Location of where the document that is getting loaded is saved + /// The Reader settings to be used during parsing. + /// + public ReadResult Read(MemoryStream input, Uri location, OpenApiReaderSettings settings) + { + if (input is null) + throw new ArgumentNullException(nameof(input)); + if (settings is null) + throw new ArgumentNullException(nameof(settings)); + + JsonNode? jsonNode; + OpenApiDiagnostic diagnostic = new(); + settings ??= new OpenApiReaderSettings(); + + // Parse the JSON text in the stream into JsonNodes + try + { + jsonNode = + JsonNode.Parse(input, JsonNodeOptions, JsonDocumentOptions) + ?? throw new InvalidOperationException($"Cannot parse input stream, {nameof(input)}."); + } + catch (JsonException ex) + { + diagnostic.Errors.Add( + new OpenApiError($"#line={ex.LineNumber}", $"Please provide the correct format, {ex.Message}") + ); + return new ReadResult { Document = null, Diagnostic = diagnostic }; + } + + return Read(jsonNode, location, settings); + } + + /// + /// Parses the JsonNode input into an Open API document. + /// + /// The JsonNode input. + /// Location of where the document that is getting loaded is saved + /// The Reader settings to be used during parsing. + /// + public ReadResult Read(JsonNode jsonNode, Uri location, OpenApiReaderSettings settings) + { + if (jsonNode is null) + throw new ArgumentNullException(nameof(jsonNode)); + if (settings is null) + throw new ArgumentNullException(nameof(settings)); + + OpenApiDiagnostic diagnostic = new OpenApiDiagnostic(); + ParsingContext context = new ParsingContext(diagnostic) + { + ExtensionParsers = settings.ExtensionParsers, + BaseUrl = settings.BaseUrl, + DefaultContentType = settings.DefaultContentType, + }; + + OpenApiDocument? document = null; + try + { + // Parse the OpenAPI Document + document = context.Parse(jsonNode, location); + document.SetReferenceHostDocument(); + } + catch (OpenApiException ex) + { + diagnostic.Errors.Add(new(ex)); + } + + // Validate the document + if (document is not null && settings.RuleSet is not null && settings.RuleSet.Rules.Any()) + { + IEnumerable? openApiErrors = document.Validate(settings.RuleSet); + + if (openApiErrors is not null) + { + foreach (OpenApiValidatorError? item in openApiErrors.OfType()) + { + diagnostic.Errors.Add(item); + } + + foreach (OpenApiValidatorWarning? item in openApiErrors.OfType()) + { + diagnostic.Warnings.Add(item); + } + } + } + + return new ReadResult { Document = document, Diagnostic = diagnostic }; + } + + /// + /// Reads the stream input asynchronously and parses it into an Open API document. + /// + /// Memory stream containing OpenAPI description to parse. + /// Location of where the document that is getting loaded is saved + /// The Reader settings to be used during parsing. + /// Propagates notifications that operations should be cancelled. + /// + public async Task ReadAsync( + Stream input, + Uri location, + OpenApiReaderSettings settings, + CancellationToken cancellationToken = default + ) + { + if (input is null) + throw new ArgumentNullException(nameof(input)); + if (settings is null) + throw new ArgumentNullException(nameof(settings)); + + JsonNode? jsonNode; + OpenApiDiagnostic diagnostic = new OpenApiDiagnostic(); + + // Parse the JSON text in the stream into JsonNodes + try + { + jsonNode = + await JsonNode + .ParseAsync( + input, + JsonNodeOptions, + JsonDocumentOptions, + cancellationToken: cancellationToken + ) + .ConfigureAwait(false) + ?? throw new InvalidOperationException($"failed to parse input stream, {nameof(input)}"); + } + catch (JsonException ex) + { + diagnostic.Errors.Add( + new OpenApiError($"#line={ex.LineNumber}", $"Please provide the correct format, {ex.Message}") + ); + return new ReadResult { Document = null, Diagnostic = diagnostic }; + } + + return Read(jsonNode, location, settings); + } + + /// + public T? ReadFragment( + MemoryStream input, + OpenApiSpecVersion version, + OpenApiDocument openApiDocument, + out OpenApiDiagnostic diagnostic, + OpenApiReaderSettings? settings = null + ) + where T : IOpenApiElement + { + Utils.CheckArgumentNull(input); + Utils.CheckArgumentNull(openApiDocument); + + JsonNode jsonNode; + + // Parse the JSON + try + { + jsonNode = + JsonNode.Parse(input, JsonNodeOptions, JsonDocumentOptions) + ?? throw new InvalidOperationException($"Failed to parse stream, {nameof(input)}"); + } + catch (JsonException ex) + { + diagnostic = new(); + diagnostic.Errors.Add(new($"#line={ex.LineNumber}", ex.Message)); + return default; + } + + return ReadFragment(jsonNode, version, openApiDocument, out diagnostic); + } + + /// + public T? ReadFragment( + JsonNode input, + OpenApiSpecVersion version, + OpenApiDocument openApiDocument, + out OpenApiDiagnostic diagnostic, + OpenApiReaderSettings? settings = null + ) + where T : IOpenApiElement + { + diagnostic = new OpenApiDiagnostic(); + settings ??= new OpenApiReaderSettings(); + ParsingContext context = new ParsingContext(diagnostic) + { + ExtensionParsers = settings.ExtensionParsers, + }; + + IOpenApiElement? element = null; + try + { + // Parse the OpenAPI element + element = context.ParseFragment(input, version, openApiDocument); + } + catch (OpenApiException ex) + { + diagnostic.Errors.Add(new OpenApiError(ex)); + } + + // Validate the element + if (element is not null && settings.RuleSet is not null && settings.RuleSet.Rules.Any()) + { + IEnumerable? errors = element.Validate(settings.RuleSet); + + if (errors is not null) + { + foreach (OpenApiError? item in errors) + { + diagnostic.Errors.Add(item); + } + } + } + + return (T?)element; + } +} diff --git a/src/OpenApi.Client.SourceGenerators/Reflection/AssemblyVersionProvider.cs b/src/OpenApi.Client.SourceGenerators/Reflection/AssemblyVersionProvider.cs new file mode 100644 index 0000000..ffb4656 --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/Reflection/AssemblyVersionProvider.cs @@ -0,0 +1,22 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +using System.Reflection; + +namespace OpenApi.Client.SourceGenerators.Reflection; + +internal static class AssemblyVersionProvider +{ + /// + /// Gets the version of the generator assembly. + /// + public static string Get() + { + AssemblyInformationalVersionAttribute? informationalVersionAttribute = + typeof(AssemblyVersionProvider).Assembly.GetCustomAttribute(); + + return informationalVersionAttribute?.InformationalVersion ?? "1.0.0"; + } +} diff --git a/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentMethod.cs b/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentMethod.cs deleted file mode 100644 index f5d593a..0000000 --- a/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentMethod.cs +++ /dev/null @@ -1,18 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Schema; - -public enum ApiDocumentMethod -{ - Get, - Put, - Post, - Delete, - Options, - Head, - Patch, - Trace -} diff --git a/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentPath.cs b/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentPath.cs deleted file mode 100644 index b9bb4a6..0000000 --- a/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentPath.cs +++ /dev/null @@ -1,25 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Schema; - -public sealed class ApiDocumentPath -{ - public required string Path { get; init; } - - public required string OperationId { get; init; } - - public required string? Summary { get; init; } - - public required ApiDocumentMethod Method { get; init; } - - public required string? RequestBodyType { get; init; } - - public required string? RequestQueryType { get; init; } - - public required string? PathElementsType { get; init; } - - public required string? ResponseType { get; init; } -} diff --git a/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentType.cs b/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentType.cs deleted file mode 100644 index df1e64e..0000000 --- a/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentType.cs +++ /dev/null @@ -1,15 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Schema; - -public sealed class ApiDocumentType -{ - public required string Name { get; init; } - - public string? Summary { get; init; } - - public required IDictionary Properties { get; init; } -} diff --git a/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentVersion.cs b/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentVersion.cs deleted file mode 100644 index f734a52..0000000 --- a/src/OpenApi.Client.SourceGenerators/Schema/ApiDocumentVersion.cs +++ /dev/null @@ -1,17 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Schema; - -public enum ApiDocumentVersion -{ - v1_2_0, - v2_0_0, - v3_0_0, - v3_0_1, - v3_0_2, - v3_0_3, - v3_1_0 -} diff --git a/src/OpenApi.Client.SourceGenerators/Schema/IApiDocument.cs b/src/OpenApi.Client.SourceGenerators/Schema/IApiDocument.cs deleted file mode 100644 index 7b78061..0000000 --- a/src/OpenApi.Client.SourceGenerators/Schema/IApiDocument.cs +++ /dev/null @@ -1,23 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Schema; - -public interface IApiDocument -{ - ApiDocumentVersion? GetOpenApiVersion(); - - string? GetTitle(); - - string? GetDescription(); - - string? GetVersion(); - - string? GetLicense(); - - IEnumerable GetPaths(); - - IEnumerable GetTypes(); -} diff --git a/src/OpenApi.Client.SourceGenerators/Schema/v1_2_0/ApiDocument.cs b/src/OpenApi.Client.SourceGenerators/Schema/v1_2_0/ApiDocument.cs deleted file mode 100644 index 5df2a92..0000000 --- a/src/OpenApi.Client.SourceGenerators/Schema/v1_2_0/ApiDocument.cs +++ /dev/null @@ -1,84 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Schema.v1_2_0; - -// NOTE: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/1.2.md - -public sealed class ApiDocument : IApiDocument -{ - public string? SwaggerVersion { get; set; } - - public string? ApiVersion { get; set; } - - public Resource[]? Apis { get; set; } - - public Info? Info { get; set; } - - public Dictionary? Authorizations { get; set; } - - public ApiDocumentVersion? GetOpenApiVersion() - { - return ApiDocumentVersion.v1_2_0; - } - - public string? GetTitle() => Info?.Title; - - public string? GetDescription() => Info?.Description; - - public string? GetLicense() => Info?.License; - - public string? GetVersion() => ApiVersion; - - public IEnumerable GetPaths() - { - yield break; - } - - public IEnumerable GetTypes() - { - yield break; - } -} - -public sealed class Info -{ - public string? Title { get; set; } - - public string? Description { get; set; } - - public string? TermsOfServiceUrl { get; set; } - - public string? Contact { get; set; } - - public string? License { get; set; } - - public string? LicenseUrl { get; set; } -} - -public sealed class Resource -{ - public string? Path { get; set; } - - public string? Description { get; set; } -} - -public sealed class Authorization -{ - public string? Type { get; set; } - - public string? PassAss { get; set; } - - public string? KeyName { get; set; } - - public AuthorizationScope[]? Scopes { get; set; } -} - -public sealed class AuthorizationScope -{ - public string? Scope { get; set; } - - public string? Description { get; set; } -} diff --git a/src/OpenApi.Client.SourceGenerators/Schema/v2_0_0/ApiDocument.cs b/src/OpenApi.Client.SourceGenerators/Schema/v2_0_0/ApiDocument.cs deleted file mode 100644 index d3dfd2b..0000000 --- a/src/OpenApi.Client.SourceGenerators/Schema/v2_0_0/ApiDocument.cs +++ /dev/null @@ -1,220 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Schema.v2_0_0; - -// NOTE: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md - -internal sealed class ApiDocument : IApiDocument -{ - public string? Swagger { get; set; } - - public Info? Info { get; set; } - - public Dictionary? Paths { get; set; } - - public ApiDocumentVersion? GetOpenApiVersion() - { - return ApiDocumentVersion.v2_0_0; - } - - public string? GetTitle() => Info?.Title; - - public string? GetDescription() => Info?.Description; - - public string? GetLicense() => Info?.License?.Name; - - public string? GetVersion() => Info?.Version; - - public IEnumerable GetPaths() - { - if (Paths is null) - { - yield break; - } - - foreach (KeyValuePair path in Paths) - { - if (path.Value.Get?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Get, path.Key, path.Value.Get); - } - - if (path.Value.Put?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Put, path.Key, path.Value.Put); - } - - if (path.Value.Post?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Post, path.Key, path.Value.Post); - } - - if (path.Value.Delete?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Delete, path.Key, path.Value.Delete); - } - - if (path.Value.Options?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Options, path.Key, path.Value.Options); - } - - if (path.Value.Head?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Head, path.Key, path.Value.Head); - } - - if (path.Value.Patch?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Patch, path.Key, path.Value.Patch); - } - } - } - - public IEnumerable GetTypes() - { - yield return new ApiDocumentType - { - Name = "User", - Properties = new Dictionary - { - { "string", "Name" }, - { "int", "Age" }, - { "bool", "IsValid" } - } - }; - yield break; - } - - private ApiDocumentPath ComputePath(ApiDocumentMethod method, string path, Operation operation) - { - return new ApiDocumentPath - { - Method = method, - Path = path, - OperationId = operation.OperationId!, - Summary = operation.Summary, - RequestBodyType = string.Empty, - RequestQueryType = string.Empty, - PathElementsType = string.Empty, - ResponseType = string.Empty - }; - } -} - -internal sealed class Info -{ - public string? Title { get; set; } - - public string? Description { get; set; } - - public string? TermsOfService { get; set; } - - public Contact? Contact { get; set; } - - public License? License { get; set; } - - public string? Version { get; set; } -} - -internal sealed class Contact -{ - public string? Name { get; set; } - - public string? Url { get; set; } - - public string? Email { get; set; } -} - -internal sealed class License -{ - public string? Name { get; set; } - - public string? Url { get; set; } -} - -public sealed class PathItem -{ - public Operation? Get { get; set; } - - public Operation? Put { get; set; } - - public Operation? Post { get; set; } - - public Operation? Delete { get; set; } - - public Operation? Options { get; set; } - - public Operation? Head { get; set; } - - public Operation? Patch { get; set; } - - public IParameter[]? Parameters { get; set; } -} - -public interface IParameter; - -public sealed class Parameter : IParameter -{ - public string? Name { get; set; } - - public string? In { get; set; } - - public string? Description { get; set; } - - public bool Required { get; set; } -} - -public sealed class ParameterReference : IParameter -{ - [JsonPropertyName("$ref")] - public string? Ref { get; set; } -} - -public sealed class Operation -{ - public string[]? Tags { get; set; } - - public string? Summary { get; set; } - - public string? Description { get; set; } - - public ExternalDocumentation? ExternalDocs { get; set; } - - public string? OperationId { get; set; } - - public string[]? Consumes { get; set; } - - public string[]? Produces { get; set; } - - public IParameter[]? Parameters { get; set; } - - public Dictionary? Responses { get; set; } - - public string[]? Schemes { get; set; } - - public bool Deprecated { get; set; } -} - -public sealed class ExternalDocumentation -{ - public string? Description { get; set; } - - public string? Url { get; set; } -} - -public interface IResponse; - -public sealed class Response : IResponse -{ - public string? Description { get; set; } -} - -public sealed class ResponseReference : IResponse -{ - [JsonPropertyName("$ref")] - public string? Ref { get; set; } -} diff --git a/src/OpenApi.Client.SourceGenerators/Schema/v3_1_0/ApiDocument.cs b/src/OpenApi.Client.SourceGenerators/Schema/v3_1_0/ApiDocument.cs deleted file mode 100644 index 0cae99d..0000000 --- a/src/OpenApi.Client.SourceGenerators/Schema/v3_1_0/ApiDocument.cs +++ /dev/null @@ -1,307 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Schema.v3_1_0; - -// NOTE: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md - -/// -/// This is the root object of the OpenAPI document. -/// -public sealed class ApiDocument : IApiDocument -{ - public string? OpenApi { get; set; } - - public Info? Info { get; set; } - - public Dictionary? Paths { get; set; } - - public Components? Components { get; set; } - - public ApiDocumentVersion? GetOpenApiVersion() - { - return ApiDocumentVersion.v3_1_0; - } - - public string? GetTitle() => Info?.Title; - - public string? GetDescription() => Info?.Description; - - public string? GetLicense() => Info?.License?.Name; - - public string? GetVersion() => Info?.Version; - - public IEnumerable GetPaths() - { - if (Paths is null) - { - yield break; - } - - foreach (KeyValuePair path in Paths) - { - if (path.Value.Get?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Get, path.Key, path.Value.Get); - } - - if (path.Value.Put?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Put, path.Key, path.Value.Put); - } - - if (path.Value.Post?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Post, path.Key, path.Value.Post); - } - - if (path.Value.Delete?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Delete, path.Key, path.Value.Delete); - } - - if (path.Value.Options?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Options, path.Key, path.Value.Options); - } - - if (path.Value.Head?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Head, path.Key, path.Value.Head); - } - - if (path.Value.Patch?.OperationId is not null) - { - yield return ComputePath(ApiDocumentMethod.Patch, path.Key, path.Value.Patch); - } - } - } - - public IEnumerable GetTypes() - { - yield break; - //foreach (KeyValuePair schema in Components.Schemas) - //{ - // if (schema.Value is SchemaType typedSchema) - // { - // Dictionary properties = new Dictionary(); - - // string typeName = schema.Key; - // string summary = typedSchema.Description; - - // // 5. Yield ApiDocumentType - // yield return new ApiDocumentType - // { - // Name = typeName, - // Summary = summary, - // Properties = properties - // }; - // } - //} - } - - private ApiDocumentPath ComputePath(ApiDocumentMethod method, string path, Operation operation) - { - return new ApiDocumentPath - { - Method = method, - Path = path, - OperationId = operation.OperationId!, - Summary = operation.Summary, - RequestBodyType = string.Empty, - RequestQueryType = string.Empty, - PathElementsType = string.Empty, - ResponseType = string.Empty - }; - } -} - -public sealed class Info -{ - public string? Title { get; set; } - - public string? Description { get; set; } - - public string? TermsOfService { get; set; } - - public Contact? Contact { get; set; } - - public License? License { get; set; } - - public string? Version { get; set; } -} - -public sealed class Contact -{ - public string? Name { get; set; } - - public string? Url { get; set; } - - public string? Email { get; set; } -} - -public sealed class License -{ - public string? Name { get; set; } - - public string? Url { get; set; } -} - -public sealed class PathItem -{ - public Operation? Get { get; set; } - - public Operation? Put { get; set; } - - public Operation? Post { get; set; } - - public Operation? Delete { get; set; } - - public Operation? Options { get; set; } - - public Operation? Head { get; set; } - - public Operation? Patch { get; set; } -} - -public sealed class Operation -{ - public string[]? Tags { get; set; } - - public string? Summary { get; set; } - - public string? Description { get; set; } - - public ExternalDocumentation? ExternalDocs { get; set; } - - public string? OperationId { get; set; } - - public IParameter[]? Parameters { get; set; } - - public IRequestBody? RequestBody { get; set; } - - public Dictionary? Responses { get; set; } - - public bool Deprecated { get; set; } -} - -public sealed class ExternalDocumentation -{ - public string? Description { get; set; } - - public string? Url { get; set; } -} - -public interface IParameter; - -public sealed class Parameter : IParameter -{ - public string? Name { get; set; } - - public string? In { get; set; } - - public string? Description { get; set; } - - public bool Required { get; set; } - - public bool Deprecated { get; set; } - - public bool AllowEmptyValue { get; set; } - - public string? Style { get; set; } - - public bool Explode { get; set; } - - public ISchemaType? Schema { get; set; } -} - -public sealed class ParameterReference : IParameter -{ - [JsonPropertyName("$ref")] - public string? Ref { get; set; } -} - -public interface IRequestBody; - -public sealed class RequestBody : IRequestBody -{ - public string? Description { get; set; } - - public Dictionary? Content { get; set; } - - public bool Required { get; set; } -} - -public sealed class RequestBodyReference : IRequestBody -{ - [JsonPropertyName("$ref")] - public string? Ref { get; set; } -} - -public sealed class MediaType -{ - public ISchemaType? Schema { get; set; } -} - -public interface ISchemaType; - -public sealed class SchemaType : ISchemaType -{ - public bool Nullable { get; set; } - - public bool ReadOnly { get; set; } - - public bool WriteOnly { get; set; } - - public bool Deprecated { get; set; } - - public decimal? Minimum { get; set; } - - public decimal? Maximum { get; set; } - - public string? Type { get; set; } - - public string? Description { get; set; } - - public string? Format { get; set; } - - public ISchemaType? Items { get; set; } - - public Dictionary? Properties { get; set; } -} - -public sealed class SchemaTypeReference : ISchemaType -{ - [JsonPropertyName("$ref")] - public string? Ref { get; set; } -} - -public interface IResponse; - -public sealed class Response : IResponse -{ - public string? Description { get; set; } - - public Dictionary? Content { get; set; } -} - -public sealed class ResponseReference : IResponse -{ - [JsonPropertyName("$ref")] - public string? Ref { get; set; } -} - -public sealed class Components -{ - public Dictionary? Schemas { get; set; } - - public Dictionary? Responses { get; set; } - - public Dictionary? RequestBodies { get; set; } - - public Dictionary? Parameters { get; set; } - - public Dictionary? PathItems { get; set; } -} diff --git a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v2_0_0/ParameterJsonConverter.cs b/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v2_0_0/ParameterJsonConverter.cs deleted file mode 100644 index 061c55e..0000000 --- a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v2_0_0/ParameterJsonConverter.cs +++ /dev/null @@ -1,44 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Schema.v2_0_0; - -namespace OpenApi.Client.SourceGenerators.Serialization.Converters.v2_0_0; - -public sealed class ParameterJsonConverter : JsonConverter -{ - public override IParameter? Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - using JsonDocument jsonDoc = JsonDocument.ParseValue(ref reader); - JsonElement jsonObject = jsonDoc.RootElement; - - if (jsonObject.TryGetProperty("$ref", out _)) - { - return JsonSerializer.Deserialize(jsonObject.GetRawText(), options); - } - - return JsonSerializer.Deserialize(jsonObject.GetRawText(), options); - } - - public override void Write( - Utf8JsonWriter writer, - IParameter value, - JsonSerializerOptions options - ) - { - if (value is ParameterReference) - { - JsonSerializer.Serialize(writer, value as ParameterReference, options); - } - else if (value is Parameter) - { - JsonSerializer.Serialize(writer, value as Parameter, options); - } - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v2_0_0/ResponseJsonConverter.cs b/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v2_0_0/ResponseJsonConverter.cs deleted file mode 100644 index 0c6b67e..0000000 --- a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v2_0_0/ResponseJsonConverter.cs +++ /dev/null @@ -1,44 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Schema.v2_0_0; - -namespace OpenApi.Client.SourceGenerators.Serialization.Converters.v2_0_0; - -public sealed class ResponseJsonConverter : JsonConverter -{ - public override IResponse? Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - using JsonDocument jsonDoc = JsonDocument.ParseValue(ref reader); - JsonElement jsonObject = jsonDoc.RootElement; - - if (jsonObject.TryGetProperty("$ref", out _)) - { - return JsonSerializer.Deserialize(jsonObject.GetRawText(), options); - } - - return JsonSerializer.Deserialize(jsonObject.GetRawText(), options); - } - - public override void Write( - Utf8JsonWriter writer, - IResponse value, - JsonSerializerOptions options - ) - { - if (value is ResponseReference) - { - JsonSerializer.Serialize(writer, value as ResponseReference, options); - } - else if (value is Response) - { - JsonSerializer.Serialize(writer, value as Response, options); - } - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/ParameterJsonConverter.cs b/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/ParameterJsonConverter.cs deleted file mode 100644 index 5734793..0000000 --- a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/ParameterJsonConverter.cs +++ /dev/null @@ -1,44 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Schema.v3_1_0; - -namespace OpenApi.Client.SourceGenerators.Serialization.Converters.v3_1_0; - -public sealed class ParameterJsonConverter : JsonConverter -{ - public override IParameter? Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - using JsonDocument jsonDoc = JsonDocument.ParseValue(ref reader); - JsonElement jsonObject = jsonDoc.RootElement; - - if (jsonObject.TryGetProperty("$ref", out _)) - { - return JsonSerializer.Deserialize(jsonObject.GetRawText(), options); - } - - return JsonSerializer.Deserialize(jsonObject.GetRawText(), options); - } - - public override void Write( - Utf8JsonWriter writer, - IParameter value, - JsonSerializerOptions options - ) - { - if (value is ParameterReference) - { - JsonSerializer.Serialize(writer, value as ParameterReference, options); - } - else if (value is Parameter) - { - JsonSerializer.Serialize(writer, value as Parameter, options); - } - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/RequestBodyJsonConverter.cs b/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/RequestBodyJsonConverter.cs deleted file mode 100644 index 7d3cc4d..0000000 --- a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/RequestBodyJsonConverter.cs +++ /dev/null @@ -1,47 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Schema.v3_1_0; - -namespace OpenApi.Client.SourceGenerators.Serialization.Converters.v3_1_0; - -public sealed class RequestBodyJsonConverter : JsonConverter -{ - public override IRequestBody? Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - using JsonDocument jsonDoc = JsonDocument.ParseValue(ref reader); - JsonElement jsonObject = jsonDoc.RootElement; - - if (jsonObject.TryGetProperty("$ref", out _)) - { - return JsonSerializer.Deserialize( - jsonObject.GetRawText(), - options - ); - } - - return JsonSerializer.Deserialize(jsonObject.GetRawText(), options); - } - - public override void Write( - Utf8JsonWriter writer, - IRequestBody value, - JsonSerializerOptions options - ) - { - if (value is RequestBodyReference) - { - JsonSerializer.Serialize(writer, value as RequestBodyReference, options); - } - else if (value is RequestBody) - { - JsonSerializer.Serialize(writer, value as RequestBody, options); - } - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/ResponseJsonConverter.cs b/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/ResponseJsonConverter.cs deleted file mode 100644 index c13f10d..0000000 --- a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/ResponseJsonConverter.cs +++ /dev/null @@ -1,44 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Schema.v3_1_0; - -namespace OpenApi.Client.SourceGenerators.Serialization.Converters.v3_1_0; - -public sealed class ResponseJsonConverter : JsonConverter -{ - public override IResponse? Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - using JsonDocument jsonDoc = JsonDocument.ParseValue(ref reader); - JsonElement jsonObject = jsonDoc.RootElement; - - if (jsonObject.TryGetProperty("$ref", out _)) - { - return JsonSerializer.Deserialize(jsonObject.GetRawText(), options); - } - - return JsonSerializer.Deserialize(jsonObject.GetRawText(), options); - } - - public override void Write( - Utf8JsonWriter writer, - IResponse value, - JsonSerializerOptions options - ) - { - if (value is ResponseReference) - { - JsonSerializer.Serialize(writer, value as ResponseReference, options); - } - else if (value is Response) - { - JsonSerializer.Serialize(writer, value as Response, options); - } - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/SchemaTypeJsonConverter.cs b/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/SchemaTypeJsonConverter.cs deleted file mode 100644 index a70210b..0000000 --- a/src/OpenApi.Client.SourceGenerators/Serialization/Converters/v3_1_0/SchemaTypeJsonConverter.cs +++ /dev/null @@ -1,47 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Schema.v3_1_0; - -namespace OpenApi.Client.SourceGenerators.Serialization.Converters.v3_1_0; - -public sealed class SchemaTypeJsonConverter : JsonConverter -{ - public override ISchemaType? Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options - ) - { - using JsonDocument jsonDoc = JsonDocument.ParseValue(ref reader); - JsonElement jsonObject = jsonDoc.RootElement; - - if (jsonObject.TryGetProperty("$ref", out _)) - { - return JsonSerializer.Deserialize( - jsonObject.GetRawText(), - options - ); - } - - return JsonSerializer.Deserialize(jsonObject.GetRawText(), options); - } - - public override void Write( - Utf8JsonWriter writer, - ISchemaType value, - JsonSerializerOptions options - ) - { - if (value is SchemaTypeReference) - { - JsonSerializer.Serialize(writer, value as SchemaTypeReference, options); - } - else if (value is SchemaType) - { - JsonSerializer.Serialize(writer, value as SchemaType, options); - } - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Serialization/OpenApiSerializer.cs b/src/OpenApi.Client.SourceGenerators/Serialization/OpenApiSerializer.cs deleted file mode 100644 index 0fcbf21..0000000 --- a/src/OpenApi.Client.SourceGenerators/Serialization/OpenApiSerializer.cs +++ /dev/null @@ -1,139 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using OpenApi.Client.SourceGenerators.Schema; - -namespace OpenApi.Client.SourceGenerators.Serialization; - -public sealed class OpenApiSerializer() -{ - private static readonly JsonSerializerOptions jsonSettings = new JsonSerializerOptions - { - PropertyNameCaseInsensitive = true, - AllowTrailingCommas = true, - Converters = - { - new JsonStringEnumConverter(), - new Converters.v2_0_0.ParameterJsonConverter(), - new Converters.v2_0_0.ResponseJsonConverter(), - new Converters.v3_1_0.ParameterJsonConverter(), - new Converters.v3_1_0.RequestBodyJsonConverter(), - new Converters.v3_1_0.ResponseJsonConverter(), - new Converters.v3_1_0.SchemaTypeJsonConverter() - } - }; - - public SerializationResult Deserialize(string? documentName, string? input) - { - documentName ??= "UNKNOWN_FILE_NAME"; - - if (string.IsNullOrEmpty(input)) - { - return new SerializationResultError( - $"Extracting Open API version from \"{documentName}\" failed." - ); - } - - ApiDocumentVersion? version = null; - - try - { - version = GetProvidedDocumentVersion(input!); - } - catch (Exception e) - { - return new SerializationResultError( - $"Extracting Open API version from \"{documentName}\" failed with error: {e.Message}." - ); - } - - if (version is null) - { - return new SerializationResultError( - $"Extracting Open API version from \"{documentName}\" failed." - ); - } - - IApiDocument? serializationResult; - - try - { - serializationResult = SerializeApiDocument(input!, version.Value); - } - catch (Exception e) - { - return new SerializationResultError( - $"Serialization of document \"{documentName}\" failed with error: {e.Message}" - ); - } - - return new SerializationResult(serializationResult); - } - - private ApiDocumentVersion? GetProvidedDocumentVersion(string input) - { - OpenApiMarkerObject? markerObject = null; - - markerObject = JsonSerializer.Deserialize(input, jsonSettings); - - if (markerObject is null) - { - return null; - } - - string version = - markerObject.Value.openapi?.Trim().ToLower() - ?? markerObject.Value.swagger?.Trim().ToLower() - ?? markerObject.Value.swaggerVersion?.Trim().ToLower() - ?? string.Empty; - - return version switch - { - "1" => ApiDocumentVersion.v1_2_0, - "1.2" => ApiDocumentVersion.v1_2_0, - "1.2.0" => ApiDocumentVersion.v1_2_0, - "2" => ApiDocumentVersion.v2_0_0, - "2.0" => ApiDocumentVersion.v2_0_0, - "2.0.0" => ApiDocumentVersion.v2_0_0, - "3" => ApiDocumentVersion.v3_0_0, - "3.0" => ApiDocumentVersion.v3_0_0, - "3.0.0" => ApiDocumentVersion.v3_0_0, - "3.0.1" => ApiDocumentVersion.v3_0_1, - "3.0.2" => ApiDocumentVersion.v3_0_2, - "3.0.3" => ApiDocumentVersion.v3_0_3, - "3.1" => ApiDocumentVersion.v3_1_0, - "3.1.0" => ApiDocumentVersion.v3_1_0, - _ => null - }; - } - - private IApiDocument? SerializeApiDocument(string input, ApiDocumentVersion version) - { - switch (version) - { - case ApiDocumentVersion.v1_2_0: - return JsonSerializer.Deserialize(input, jsonSettings); - - case ApiDocumentVersion.v2_0_0: - return JsonSerializer.Deserialize(input, jsonSettings); - - case ApiDocumentVersion.v3_0_0: - case ApiDocumentVersion.v3_0_1: - case ApiDocumentVersion.v3_0_2: - case ApiDocumentVersion.v3_0_3: - case ApiDocumentVersion.v3_1_0: - return JsonSerializer.Deserialize(input, jsonSettings); - - default: - return null; - } - } - - private readonly record struct OpenApiMarkerObject( - string? openapi, - string? swagger, - string? swaggerVersion - ); -} diff --git a/src/OpenApi.Client.SourceGenerators/Serialization/SerializationResult.cs b/src/OpenApi.Client.SourceGenerators/Serialization/SerializationResult.cs deleted file mode 100644 index 1ea72fd..0000000 --- a/src/OpenApi.Client.SourceGenerators/Serialization/SerializationResult.cs +++ /dev/null @@ -1,32 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Serialization; - -public sealed class SerializationResult -{ - public SerializationResult(params SerializationResultError[] errors) - { - Result = default; - Errors = errors; - } - - public SerializationResult(TResult? result) - { - Result = result; - Errors = Array.Empty(); - } - - public TResult? Result { get; } - - public SerializationResultError[] Errors { get; } - - public bool HasErrors => Errors.Length > 0; - - public static implicit operator SerializationResult(SerializationResultError error) - { - return new SerializationResult(error); - } -} diff --git a/src/OpenApi.Client.SourceGenerators/Serialization/SerializationResultError.cs b/src/OpenApi.Client.SourceGenerators/Serialization/SerializationResultError.cs deleted file mode 100644 index e1ea92a..0000000 --- a/src/OpenApi.Client.SourceGenerators/Serialization/SerializationResultError.cs +++ /dev/null @@ -1,8 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -namespace OpenApi.Client.SourceGenerators.Serialization; - -public readonly record struct SerializationResultError(string Message); diff --git a/src/OpenApi.Client.SourceGenerators/Helpers/HashCode.cs b/src/OpenApi.Client.SourceGenerators/System/HashCode.cs similarity index 97% rename from src/OpenApi.Client.SourceGenerators/Helpers/HashCode.cs rename to src/OpenApi.Client.SourceGenerators/System/HashCode.cs index 225e3ff..76728ce 100644 --- a/src/OpenApi.Client.SourceGenerators/Helpers/HashCode.cs +++ b/src/OpenApi.Client.SourceGenerators/System/HashCode.cs @@ -8,11 +8,11 @@ // See the LICENSE file in the project root for more information. using System.ComponentModel; -using System.Runtime.CompilerServices; using System.Security.Cryptography; #pragma warning disable CS0809 +// ReSharper disable once CheckNamespace namespace System; /// @@ -181,10 +181,7 @@ public int ToHashCode() public override int GetHashCode() => throw new NotSupportedException(); /// - [Obsolete( - "HashCode is a mutable struct and should not be compared with other HashCodes.", - error: true - )] + [Obsolete("HashCode is a mutable struct and should not be compared with other HashCodes.", error: true)] [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object? obj) => throw new NotSupportedException(); diff --git a/src/OpenApi.Client.SourceGenerators/Utils.cs b/src/OpenApi.Client.SourceGenerators/Utils.cs new file mode 100644 index 0000000..7a16881 --- /dev/null +++ b/src/OpenApi.Client.SourceGenerators/Utils.cs @@ -0,0 +1,58 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +namespace OpenApi.Client.SourceGenerators; + +/// +/// Utilities methods +/// +internal static class Utils +{ + /// + /// Check whether the input argument value is null or not. + /// + /// The input value type. + /// The input value. + /// The input parameter name. + /// The input value. + internal static T CheckArgumentNull( +#if NET5_0_OR_GREATER + [NotNull] T value, +#else + T value, +#endif + [CallerArgumentExpression(nameof(value))] string parameterName = "" + ) + { + return value + ?? throw new ArgumentNullException(parameterName, $"Value cannot be null: {parameterName}"); + } + + /// + /// Check whether the input string value is null or empty. + /// + /// The input string value. + /// The input parameter name. + /// The input value. + internal static string CheckArgumentNullOrEmpty( +#if NET5_0_OR_GREATER + [NotNull] string value, +#else + string value, +#endif + [CallerArgumentExpression(nameof(value))] string parameterName = "" + ) + { + return string.IsNullOrWhiteSpace(value) + ? throw new ArgumentNullException( + parameterName, + $"Value cannot be null or empty: {parameterName}" + ) + : value; + } +} diff --git a/src/OpenApi.Client/OpenApi.Client.csproj b/src/OpenApi.Client/OpenApi.Client.csproj index c84fd59..cc00065 100644 --- a/src/OpenApi.Client/OpenApi.Client.csproj +++ b/src/OpenApi.Client/OpenApi.Client.csproj @@ -1,72 +1,117 @@ - - + OpenApiClient - netstandard2.0;netstandard2.1;net6.0;net8.0 + netstandard2.0 true OpenAPI Client is a toolkit with source generators that helps you create HTTP clients for external APIs based on their OpenAPI specifications. It simplifies the process of consuming and interacting with various web services. + lib/ + false - - System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute; - System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute; - System.Diagnostics.CodeAnalysis.MemberNotNullAttribute; - System.Diagnostics.CodeAnalysis.NotNullAttribute; - System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute; - System.Diagnostics.CodeAnalysis.NotNullWhenAttribute; - System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute; - System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute; - System.Runtime.CompilerServices.CallerArgumentExpressionAttribute; - System.Runtime.CompilerServices.IsExternalInit; System.Runtime.CompilerServices.SkipLocalsInitAttribute; - - - - + + + + - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - diff --git a/src/OpenApi.Client/OpenApi.Client.targets b/src/OpenApi.Client/OpenApi.Client.targets deleted file mode 100644 index 2b00e0d..0000000 --- a/src/OpenApi.Client/OpenApi.Client.targets +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @(OpenApiClientCurrentCompilerAssemblyIdentity->'%(Version)') - - - true - - - - - - - - - - - - - - true - - - - - - - - - roslyn4.3 - roslyn4.0 - - - - - - - - - - - - true - - - - - - - - - - true - - - - - - - diff --git a/tests/OpenApi.Client.Cli.UnitTests/GenerateCommandTests.cs b/tests/OpenApi.Client.Cli.UnitTests/GenerateCommandTests.cs new file mode 100644 index 0000000..6c60bdd --- /dev/null +++ b/tests/OpenApi.Client.Cli.UnitTests/GenerateCommandTests.cs @@ -0,0 +1,46 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +using OpenApi.Client.Cli.Commands; +using OpenApi.Client.Cli.UnitTests.Hosting; + +namespace OpenApi.Client.Cli.UnitTests; + +public sealed class GenerateCommandTests +{ + [Fact] + public async Task GenerateCommand_Should_ExecuteSuccessfully() + { + _ = nameof(GenerateCommand.Validate); + _ = nameof(GenerateCommand.ExecuteAsync); + + string outputPath = Path.Combine(Directory.GetCurrentDirectory(), $"{Path.GetRandomFileName()}.cs"); + + string getAbsolutePath = Path.GetFullPath("OpenApis/openapi-3.1.0.json"); + + await HostFactoryResolver.Run( + "generate", + $"{getAbsolutePath}", + "--output", + $"{outputPath}", + "--namespace", + "TicTacToeModule.Client", + "--classname", + "TicTacToeClient" + ); + + File.Exists(outputPath).Should().BeTrue("The output file should be created."); + string generatedCode = await File.ReadAllTextAsync(outputPath); + + generatedCode.Should().NotBeNullOrWhiteSpace(); + generatedCode + .Should() + .ContainAll( + "namespace TicTacToeModule.Client", + "class TicTacToeClient", + "interface ITicTacToeClient" + ); + } +} diff --git a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Usings.cs b/tests/OpenApi.Client.Cli.UnitTests/GlobalUsings.cs similarity index 75% rename from tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Usings.cs rename to tests/OpenApi.Client.Cli.UnitTests/GlobalUsings.cs index d3cb5db..7b25507 100644 --- a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Usings.cs +++ b/tests/OpenApi.Client.Cli.UnitTests/GlobalUsings.cs @@ -3,8 +3,8 @@ // Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. // All Rights Reserved. -global using System.Collections.Generic; global using System.IO; -global using FluentAssertions; -global using NSubstitute; +global using System.Threading.Tasks; +global using AwesomeAssertions; +global using Spectre.Console.Cli; global using Xunit; diff --git a/tests/OpenApi.Client.Cli.UnitTests/Hosting/HostFactoryResolver.cs b/tests/OpenApi.Client.Cli.UnitTests/Hosting/HostFactoryResolver.cs new file mode 100644 index 0000000..8e629ea --- /dev/null +++ b/tests/OpenApi.Client.Cli.UnitTests/Hosting/HostFactoryResolver.cs @@ -0,0 +1,53 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +using System; +using System.Reflection; + +namespace OpenApi.Client.Cli.UnitTests.Hosting; + +internal static class HostFactoryResolver +{ + /// + /// Runs the specified program with the provided arguments. + /// + public static async Task Run(params string[] args) + { + Assembly entryAssembly = typeof(TProgram).Assembly; + + MethodInfo? entryPoint = entryAssembly.EntryPoint; + + if (entryPoint is null) + { + throw new InvalidOperationException( + $"The entry point for the assembly '{entryAssembly.FullName}' is not defined." + ); + } + + Type? entryType = entryPoint.DeclaringType; + + MethodInfo? asyncMainMethod = entryType?.GetMethod( + "
$", + BindingFlags.NonPublic | BindingFlags.Static + ); + + await using StringWriter consoleOutput = new(); + Console.SetOut(consoleOutput); + + if (asyncMainMethod is null) + { + entryPoint.Invoke(null, [args]); + } + else + { + Task task = (Task)asyncMainMethod.Invoke(null, [args])!; + await task; + } + + string output = consoleOutput.ToString(); + + return output; + } +} diff --git a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests.csproj b/tests/OpenApi.Client.Cli.UnitTests/OpenApi.Client.Cli.UnitTests.csproj similarity index 73% rename from tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests.csproj rename to tests/OpenApi.Client.Cli.UnitTests/OpenApi.Client.Cli.UnitTests.csproj index 53445d9..653a65b 100644 --- a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests.csproj +++ b/tests/OpenApi.Client.Cli.UnitTests/OpenApi.Client.Cli.UnitTests.csproj @@ -1,17 +1,16 @@ - - + - net8.0 + $(CommonTargetFramework) false true - + + - runtime; build; native; contentfiles; analyzers; buildtransitive @@ -22,11 +21,9 @@ all - - + - PreserveNewest @@ -34,15 +31,20 @@ PreserveNewest + + PreserveNewest + PreserveNewest PreserveNewest + + PreserveNewest + PreserveNewest - diff --git a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApis/openapi-1.2.0.json b/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-1.2.0.json similarity index 100% rename from tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApis/openapi-1.2.0.json rename to tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-1.2.0.json diff --git a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApis/openapi-2.0.0.json b/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-2.0.0.json similarity index 100% rename from tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApis/openapi-2.0.0.json rename to tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-2.0.0.json diff --git a/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.0.0.json b/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.0.0.json new file mode 100644 index 0000000..31d2e9b --- /dev/null +++ b/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.0.0.json @@ -0,0 +1,192 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Simple API overview", + "version": "2.0.0" + }, + "paths": { + "/": { + "get": { + "operationId": "listVersionsv2", + "summary": "List API versions", + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "versions": [ + { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + } + ] + }, + { + "status": "EXPERIMENTAL", + "updated": "2013-07-23T11:33:21Z", + "id": "v3.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v3/", + "rel": "self" + } + ] + } + ] + } + } + } + } + } + }, + "300": { + "description": "300 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "versions": [ + { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + } + ] + }, + { + "status": "EXPERIMENTAL", + "updated": "2013-07-23T11:33:21Z", + "id": "v3.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v3/", + "rel": "self" + } + ] + } + ] + } + } + } + } + } + } + } + } + }, + "/v2": { + "get": { + "operationId": "getVersionDetailsv2", + "summary": "Show API version details", + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "version": { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "media-types": [ + { + "base": "application/xml", + "type": "application/vnd.openstack.compute+xml;version=2" + }, + { + "base": "application/json", + "type": "application/vnd.openstack.compute+json;version=2" + } + ], + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", + "type": "application/pdf", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + } + ] + } + } + } + } + } + } + }, + "203": { + "description": "203 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "version": { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "media-types": [ + { + "base": "application/xml", + "type": "application/vnd.openstack.compute+xml;version=2" + }, + { + "base": "application/json", + "type": "application/vnd.openstack.compute+json;version=2" + } + ], + "id": "v2.0", + "links": [ + { + "href": "http://23.253.228.211:8774/v2/", + "rel": "self" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", + "type": "application/pdf", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + } + ] + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApis/openapi-3.0.1.extended.json b/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.0.1.extended.json similarity index 100% rename from tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApis/openapi-3.0.1.extended.json rename to tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.0.1.extended.json diff --git a/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.0.2.extended.json b/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.0.2.extended.json new file mode 100644 index 0000000..496662e --- /dev/null +++ b/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.0.2.extended.json @@ -0,0 +1,51672 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Camunda Platform REST API", + "description": "OpenApi Spec for Camunda Platform REST API.", + "version": "7.22.0", + "license": { + "name": "Apache License 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "externalDocs": { + "description": "Find out more about Camunda Rest API", + "url": "https://docs.camunda.org/manual/7.22/reference/rest/overview/" + }, + "servers": [ + { + "url": "http://{host}:{port}/{contextPath}", + "description": "The API server for the default process engine", + "variables": { + "host": { + "default": "localhost" + }, + "port": { + "default": "8080" + }, + "contextPath": { + "default": "engine-rest" + } + } + }, + { + "url": "http://{host}:{port}/{contextPath}/engine/{engineName}", + "description": "The API server for a named process engine", + "variables": { + "host": { + "default": "localhost" + }, + "port": { + "default": "8080" + }, + "contextPath": { + "default": "engine-rest" + }, + "engineName": { + "default": "default" + } + } + }, + { + "url": "{url}", + "description": "The API server with a custom url", + "variables": { + "url": { + "default": "" + } + } + } + ], + "tags": [ + { + "name": "Authorization" + }, + { + "name": "Batch" + }, + { + "name": "Condition" + }, + { + "name": "Decision Definition" + }, + { + "name": "Decision Requirements Definition" + }, + { + "name": "Deployment" + }, + { + "name": "Engine" + }, + { + "name": "Event Subscription" + }, + { + "name": "Execution" + }, + { + "name": "External Task" + }, + { + "name": "Filter" + }, + { + "name": "Group" + }, + { + "name": "Historic Activity Instance" + }, + { + "name": "Historic Batch" + }, + { + "name": "Historic Decision Definition" + }, + { + "name": "Historic Decision Instance" + }, + { + "name": "Historic Decision Requirements Definition" + }, + { + "name": "Historic Detail" + }, + { + "name": "Historic External Task Log" + }, + { + "name": "Historic Identity Link Log" + }, + { + "name": "Historic Incident" + }, + { + "name": "Historic Job Log" + }, + { + "name": "Historic Process Definition" + }, + { + "name": "Historic Process Instance" + }, + { + "name": "Historic Task Instance" + }, + { + "name": "Historic User Operation Log" + }, + { + "name": "Historic Variable Instance" + }, + { + "name": "History Cleanup" + }, + { + "name": "Identity" + }, + { + "name": "Incident" + }, + { + "name": "Job" + }, + { + "name": "Job Definition" + }, + { + "name": "Message" + }, + { + "name": "Metrics" + }, + { + "name": "Migration" + }, + { + "name": "Modification" + }, + { + "name": "Process Definition" + }, + { + "name": "Process Instance" + }, + { + "name": "Signal" + }, + { + "name": "Schema Log" + }, + { + "name": "Task" + }, + { + "name": "Task Attachment" + }, + { + "name": "Task Comment" + }, + { + "name": "Task Identity Link" + }, + { + "name": "Task Local Variable" + }, + { + "name": "Task Variable" + }, + { + "name": "Telemetry" + }, + { + "name": "Tenant" + }, + { + "name": "User" + }, + { + "name": "Variable Instance" + }, + { + "name": "Version" + } + ], + "paths": { + "/authorization": { + "get": { + "operationId": "queryAuthorizations", + "tags": [ + "Authorization" + ], + "summary": "Get Authorizations", + "description": "Queries for a list of authorizations using a list of parameters.\nThe size of the result set can be retrieved by using the\n[Get Authorization Count](https://docs.camunda.org/manual/7.22/reference/rest/authorization/get-query-count/) method.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the authorization." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by authorization type. (0\u003dglobal, 1\u003dgrant, 2\u003drevoke).\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#authorization-type)\nfor more information about authorization types." + }, + { + "name": "userIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of userIds." + }, + { + "name": "groupIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of groupIds." + }, + { + "name": "resourceType", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by an integer representation of the resource type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + { + "name": "resourceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by resource id." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "resourceType", + "resourceId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuthorizationDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/authorization?userIdIn\u003djonny1,jonny2`", + "value": [ + { + "id": "anAuthorizationId", + "type": 0, + "permissions": [ + "ALL" + ], + "userId": "jonny1", + "groupId": null, + "resourceType": 1, + "resourceId": "*" + }, + { + "id": "anotherAuthorizationId", + "type": 0, + "permissions": [ + "CREATE", + "READ" + ], + "userId": "jonny2", + "groupId": null, + "resourceType": 1, + "resourceId": "*", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy` is specified. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableOperationsAuthorization", + "tags": [ + "Authorization" + ], + "summary": "Authorization Resource Options", + "description": "The OPTIONS request allows you to check for the set of available operations that the currently\nauthenticated user can perform on the `/authorization` resource. Whether the user can perform an operation\nor not may depend on various factors, including the users authorizations to interact with this\nresource and the internal configuration of the process engine.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/authorization`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/authorization", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/authorization/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/authorization/create", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/authorization/check": { + "get": { + "operationId": "isUserAuthorized", + "tags": [ + "Authorization" + ], + "summary": "Perform an Authorization Check", + "description": "Performs an authorization check for the currently authenticated user.", + "parameters": [ + { + "name": "permissionName", + "in": "query", + "schema": { + "type": "string" + }, + "required": true, + "description": "String value representing the permission name to check for." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "required": true, + "description": "String value for the name of the resource to check permissions for." + }, + { + "name": "resourceType", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "required": true, + "description": "An integer representing the resource type to check permissions for.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + { + "name": "resourceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The id of the resource to check permissions for. If left blank,\na check for global permissions on the resource is performed." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The id of the user to check permissions for. The currently authenticated\nuser must have a READ permission for the Authorization resource. If `userId` is\nblank, a check for the currently authenticated user is performed." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationCheckResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/authorization/check?permissionName\u003dREAD,resourceName\u003dUSER,resourceType\u003d1,resourceId\u003djonny`", + "value": { + "permissionName": "READ", + "resourceName": "USER", + "resourceId": "jonny", + "authorized": true + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a permission\nparameterName is not valid for the provided resourceType. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The user is not authenticated. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "When a `userId` is passed and the user does not possess a READ permission for the\nAuthorization resource. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Authorization with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/authorization/count": { + "get": { + "operationId": "getAuthorizationCount", + "tags": [ + "Authorization" + ], + "summary": "Get Authorization Count", + "description": "Queries for authorizations using a list of parameters and retrieves the count.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the authorization." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by authorization type. (0\u003dglobal, 1\u003dgrant, 2\u003drevoke).\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#authorization-type)\nfor more information about authorization types." + }, + { + "name": "userIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of userIds." + }, + { + "name": "groupIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of groupIds." + }, + { + "name": "resourceType", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by an integer representation of the resource type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + { + "name": "resourceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by resource id." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/authorization/count?userIdIn\u003djonny1,jonny2`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy` is specified. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/authorization/create": { + "post": { + "operationId": "createAuthorization", + "tags": [ + "Authorization" + ], + "summary": "Create a New Authorization", + "description": "Creates a new authorization.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationCreateDto" + }, + "examples": { + "example-1": { + "summary": "POST `/authorization/create`", + "value": { + "type": 0, + "permissions": [ + "CREATE", + "READ" + ], + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/authorization/create`", + "value": { + "id": "anAuthorizationId", + "type": 0, + "permissions": [ + "CREATE", + "READ" + ], + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "links": [ + { + "method": "GET", + "href\"": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "self" + }, + { + "method": "PUT", + "href\"": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "update" + }, + { + "method": "DELETE", + "href\"": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "delete" + } + ] + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the properties in the request body are invalid, for example if\na permission parameter is not valid for the provided resourceType.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authenticated user is unauthorized to create an instance of this resource. See\nthe [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authorization could not be updated due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/authorization/{id}": { + "delete": { + "operationId": "deleteAuthorization", + "tags": [ + "Authorization" + ], + "summary": "Delete Authorization", + "description": "Deletes an authorization by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the authorization to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the authenticated user is unauthorized to delete the resource instance. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Authorization cannot be found. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getAuthorization", + "tags": [ + "Authorization" + ], + "summary": "Get Authorization", + "description": "Retrieves an authorization by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the authorization to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/authorization/anAuthorizationId`", + "value": { + "id": "anAuthorizationId", + "type": 0, + "permissions": [ + "CREATE", + "READ" + ], + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Authorization with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableOperationsAuthorizationInstance", + "tags": [ + "Authorization" + ], + "summary": "Authorization Resource Options", + "description": "The OPTIONS request allows you to check for the set of available operations that the currently\nauthenticated user can perform on a given instance of the `/authorization` resource.\nWhether the user can perform an operation or not may depend on various factors, including the users\nauthorizations to interact with this resource and the internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the authorization to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/authorization/anAuthorizationId`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "self" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "update" + }, + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "delete" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + }, + "put": { + "operationId": "updateAuthorization", + "tags": [ + "Authorization" + ], + "summary": "Update an Authorization", + "description": "Updates an authorization by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the authorization to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationUpdateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/authorization/anAuthorizationId`", + "value": { + "permissions": 16, + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the properties in the request body are invalid, for example if\na permission parameter is not valid for the provided resourceType.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authenticated user is unauthorized to update this resource. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authorization with the requested Id cannot be found." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authorization could not be updated due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/batch": { + "get": { + "operationId": "getBatches", + "tags": [ + "Batch" + ], + "summary": "Get List", + "description": "Queries for batches that fulfill given parameters. Parameters may be the properties of batches, such as the id or type.\nThe size of the result set can be retrieved by using the\n[Get Batch Count](https://docs.camunda.org/manual/7.22/reference/rest/batch/get-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "batchId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A batch matches if it has one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "A `Boolean` value which indicates whether only active or suspended batches should be included.\nWhen the value is set to `true`, only suspended batches will be returned and\nwhen the value is set to `false`, only active batches will be returned." + }, + { + "name": "createdBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include batches that were started by this user id." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs with failures.\nValue can only be `true`." + }, + { + "name": "withoutFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs without failures.\nValue can only be `true`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BatchDto" + } + }, + "examples": { + "example-1": { + "description": "Response for GET `/batch?type\u003daBatchType\u0026sortBy\u003dbatchId\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "aUserId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if a `sortOrder` parameter is supplied, but no `sortBy`.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/batch/count": { + "get": { + "operationId": "getBatchesCount", + "tags": [ + "Batch" + ], + "summary": "Get List Count", + "description": "Requests the number of batches that fulfill the query criteria.\nTakes the same filtering parameters as the [Get Batches](https://docs.camunda.org/manual/7.22/reference/rest/batch/get-query/) method.", + "parameters": [ + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A batch matches if it has one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "A `Boolean` value which indicates whether only active or suspended batches should be included.\nWhen the value is set to `true`, only suspended batches will be returned and\nwhen the value is set to `false`, only active batches will be returned." + }, + { + "name": "createdBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include batches that were started by this user id." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs with failures.\nValue can only be `true`." + }, + { + "name": "withoutFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs without failures.\nValue can only be `true`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/batch/count?type\u003daBatchType`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/batch/statistics": { + "get": { + "operationId": "getBatchStatistics", + "tags": [ + "Batch" + ], + "summary": "Get Statistics", + "description": "Queries for batch statistics that fulfill given parameters.\nParameters may be the properties of batches, such as the id or type.\nThe size of the result set can be retrieved by using the \n[Get Batch Statistics Count](https://docs.camunda.org/manual/7.22/reference/rest/batch/get-statistics-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "batchId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A batch matches if it has one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "A `Boolean` value which indicates whether only active or suspended batches should be included.\nWhen the value is set to `true`, only suspended batches will be returned and\nwhen the value is set to `false`, only active batches will be returned." + }, + { + "name": "createdBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include batches that were started by this user id." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs with failures.\nValue can only be `true`." + }, + { + "name": "withoutFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs without failures.\nValue can only be `true`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BatchStatisticsDto" + } + }, + "examples": { + "example-1": { + "description": "Response for GET `/batch/statistics?type\u003daBatchType\u0026sortBy\u003dbatchId\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "remainingJobs": 3, + "completedJobs": 7, + "failedJobs": 1, + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "aUserId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if a `sortOrder` parameter is supplied, but no `sortBy`.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/batch/statistics/count": { + "get": { + "operationId": "getBatchStatisticsCount", + "tags": [ + "Batch" + ], + "summary": "Get Statistics Count", + "description": "Requests the number of batch statistics that fulfill the query criteria.\nTakes the same filtering parameters as the\n[Get Batch Statistics](https://docs.camunda.org/manual/7.22/reference/rest/batch/get-statistics-query/) method.", + "parameters": [ + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A batch matches if it has one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "A `Boolean` value which indicates whether only active or suspended batches should be included.\nWhen the value is set to `true`, only suspended batches will be returned and\nwhen the value is set to `false`, only active batches will be returned." + }, + { + "name": "createdBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include batches that were started by this user id." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs with failures.\nValue can only be `true`." + }, + { + "name": "withoutFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs without failures.\nValue can only be `true`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/batch/count?type\u003daBatchType`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/batch/{id}": { + "delete": { + "operationId": "deleteBatch", + "tags": [ + "Batch" + ], + "summary": "Delete", + "description": "Deletes a batch by id, including all related jobs and job definitions.\nOptionally also deletes the batch history.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the batch to be deleted." + }, + { + "name": "cascade", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "`true`, if the historic batch and historic job logs for this batch should also be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Batch with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "get": { + "operationId": "getBatch", + "tags": [ + "Batch" + ], + "summary": "Get", + "description": "Retrieves a batch by id, according to the Batch interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the batch to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "description": "Response for GET `/batch/aBatchId`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "aUserId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Batch with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/batch/{id}/suspended": { + "put": { + "operationId": "updateBatchSuspensionState", + "tags": [ + "Batch" + ], + "summary": "Activate/Suspend", + "description": "Activates or suspends a batch by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the batch to activate or suspend." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/batch/aBatch/suspended`", + "value": { + "suspended": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the batch cannot be suspended or activated.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/condition": { + "post": { + "operationId": "evaluateCondition", + "tags": [ + "Condition" + ], + "summary": "Evaluate", + "description": "Triggers evaluation of conditions for conditional start event(s). \nInternally this maps to the engines condition evaluation builder method ConditionEvaluationBuilder#evaluateStartConditions(). \nFor more information see the [Conditional Start Events](https://docs.camunda.org/manual/7.22/reference/bpmn20/events/conditional-events/#conditional-start-event)\nsection of the [BPMN 2.0 Implementation Reference](https://docs.camunda.org/manual/7.22/reference/bpmn20/).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationConditionDto" + }, + "examples": { + "example-1": { + "summary": "POST /condition", + "description": "The content of the Request Body", + "value": { + "variables": { + "temperature": { + "value": 24, + "type": "Integer", + "valueInfo": { + "transient": true + } + }, + "city": { + "value": "Parma", + "type": "String" + } + }, + "businessKey": "aBusinessKey", + "tenantId": "aTenantId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [ + { + "links": [], + "id": "aProcInstId", + "definitionId": "aProcDefId", + "businessKey": "aBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": "aTenantId" + }, + { + "links": [], + "id": "anotherId", + "definitionId": "aProcDefId", + "businessKey": "aBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": "aTenantId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If both tenantId and withoutTenantId are supplied." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "If the user is not allowed to start the process instance of the process definition, which start condition was evaluated to `true`." + } + } + } + }, + "/decision-definition": { + "get": { + "operationId": "getDecisionDefinitions", + "tags": [ + "Decision Definition" + ], + "summary": "Get List", + "description": "Queries for decision definitions that fulfill given parameters.\nParameters may be the properties of decision definitions, such as the name, key or version.\nThe size of the result set can be retrieved by using\nthe [Get Decision Definition Count](https://docs.camunda.org/manual/7.22/reference/rest/decision-definition/get-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "category", + "decisionRequirementsDefinitionKey", + "key", + "id", + "name", + "version", + "deploymentId", + "deployTime", + "versionTag", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "decisionDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition id." + }, + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "deployedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the decision definition belongs to.\nOnly selects decision definitions that have been deployed after (exclusive) a specific time." + }, + { + "name": "deployedAt", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the decision definition belongs to.\nOnly selects decision definitions that have been deployed at a specific time (exact match)." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition key, i.e., the id in the DMN 1.0 XML. Exact match." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition categories that the parameter is a substring of." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by decision definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those decision definitions that are latest versions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those decision definition resources that the parameter is a substring of." + }, + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the decision requirements definition this decision definition belongs to." + }, + { + "name": "decisionRequirementsDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision requirements definition this decision definition belongs to." + }, + { + "name": "withoutDecisionRequirementsDefinition", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which does not belongs to any decision requirements definition.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A decision definition must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "includeDecisionDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include decision definitions which belong to no tenant.\nCan be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "versionTag", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag." + }, + { + "name": "versionTagLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tags of those decision definition resources that the parameter is a substring of." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DecisionDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition?key\u003ddish-decision\u0026sortBy\u003dcategory\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "dish-decision:1:c633e8a8-41b7-11e6-b0ef-00aa004d0001", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey": "dish", + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if a `sortOrder` parameter is supplied, but no `sortBy`.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/count": { + "get": { + "operationId": "getDecisionDefinitionsCount", + "tags": [ + "Decision Definition" + ], + "summary": "Get List Count", + "description": "Requests the number of decision definitions that fulfill the query criteria.\nTakes the same filtering parameters as the\n[Get Decision Definition](https://docs.camunda.org/manual/7.22/reference/rest/decision-definition/get-query/) method.", + "parameters": [ + { + "name": "decisionDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition id." + }, + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "deployedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the decision definition belongs to.\nOnly selects decision definitions that have been deployed after (exclusive) a specific time." + }, + { + "name": "deployedAt", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the decision definition belongs to.\nOnly selects decision definitions that have been deployed at a specific time (exact match)." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition key, i.e., the id in the DMN 1.0 XML. Exact match." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition categories that the parameter is a substring of." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by decision definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those decision definitions that are latest versions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those decision definition resources that the parameter is a substring of." + }, + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the decision requirements definition this decision definition belongs to." + }, + { + "name": "decisionRequirementsDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision requirements definition this decision definition belongs to." + }, + { + "name": "withoutDecisionRequirementsDefinition", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which does not belongs to any decision requirements definition.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A decision definition must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "includeDecisionDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include decision definitions which belong to no tenant.\nCan be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "versionTag", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag." + }, + { + "name": "versionTagLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tags of those decision definition resources that the parameter is a substring of." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/count?key\u003ddish-decision\u0026version\u003d2`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}": { + "get": { + "operationId": "getDecisionDefinitionByKey", + "tags": [ + "Decision Definition" + ], + "summary": "Get Decision Definition By Key", + "description": "Retrieves the latest version of the decision definition which belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/dish-decision`", + "value": { + "id": "aDecisionDefinitionId", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey": "dish", + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5 + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}/diagram": { + "get": { + "operationId": "getDecisionDefinitionDiagramByKey", + "tags": [ + "Decision Definition" + ], + "summary": "Get Diagram By Key", + "description": "Returns the diagram for the latest version of the decision definition which belongs to no tenant", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The decision definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/key/{key}/evaluate": { + "post": { + "operationId": "evaluateDecisionByKey", + "tags": [ + "Decision Definition" + ], + "summary": "Evaluate By Key", + "description": "Evaluates the latest version of the decision definition which belongs to no tenant.\nThe input values of the decision have to be supplied in the request body.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be evaluated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluateDecisionDto" + }, + "examples": { + "example-1": { + "summary": "POST /decision-definition/key/aKey/evaluate", + "value": { + "variables": { + "amount": { + "value": 600, + "type": "Double" + }, + "invoiceCategory": { + "value": "Misc", + "type": "String" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/decision-definition/key/aKey/evaluate`", + "value": [ + { + "result": { + "value": "management", + "type": "String", + "valueInfo": null + } + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByDecisionDefinitionKey", + "tags": [ + "Decision Definition" + ], + "summary": "Update History Time to Live By Key", + "description": "Updates the latest version of the decision definition which belongs to no tenant.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definitions to change history time to live." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/decision-definition/key/aKey/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/key/{key}/tenant-id/{tenant-id}": { + "get": { + "operationId": "getDecisionDefinitionByKeyAndTenantId", + "tags": [ + "Decision Definition" + ], + "summary": "Get Decision Definition By Key And Tenant Id", + "description": "Retrieves the latest version of the decision definition for tenant", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the decision definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/dish-decision/tenant-id/aTenantId`", + "value": { + "id": "aDecisionDefinitionId", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey": "dish", + "tenantId": "aTenantId", + "versionTag": null, + "historyTimeToLive": 5 + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}/tenant-id/{tenant-id}/diagram": { + "get": { + "operationId": "getDecisionDefinitionDiagramByKeyAndTenant", + "tags": [ + "Decision Definition" + ], + "summary": "Get Diagram By Key And Tenant", + "description": "Returns the XML of the latest version of the decision definition for tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the decision definition belongs to." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The decision definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/key/{key}/tenant-id/{tenant-id}/evaluate": { + "post": { + "operationId": "evaluateDecisionByKeyAndTenant", + "tags": [ + "Decision Definition" + ], + "summary": "Evaluate By Key And Tenant", + "description": "Evaluates the latest version of the decision definition for tenant.\nThe input values of the decision have to be supplied in the request body.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be evaluated." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the decision definition belongs to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluateDecisionDto" + }, + "examples": { + "example-1": { + "summary": "POST /decision-definition/key/aKey/tenand-id/aTenantId/evaluate", + "value": { + "variables": { + "amount": { + "value": 600, + "type": "Double" + }, + "invoiceCategory": { + "value": "Misc", + "type": "String" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/decision-definition/akey/aKey/tenand-id/aTenantId/evaluate`", + "value": [ + { + "result": { + "value": "management", + "type": "String", + "valueInfo": null + } + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}/tenant-id/{tenant-id}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByDecisionDefinitionKeyAndTenant", + "tags": [ + "Decision Definition" + ], + "summary": "Update History Time to Live By Key And Tenant", + "description": "Updates the latest version of the decision definition for tenant.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).\nThe value of the update is mandatory by default and does not allow `null` values. To enable them, please\nset the feature flag `enforceHistoryTimeToLive` to `false`. Read more in [Configuration Properties]\n(https://docs.camunda.org/manual/7.22/reference/deployment-descriptors/tags/process-engine#configuration-properties)", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definitions to change history time to live." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the decision definition belongs to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/decision-definition/key/aKey/tenant-id/aTenantId/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/key/{key}/tenant-id/{tenant-id}/xml": { + "get": { + "operationId": "getDecisionDefinitionDmnXmlByKeyAndTenant", + "tags": [ + "Decision Definition" + ], + "summary": "Get XML By Key and Tenant", + "description": "Retrieves the XML of the latest version of the decision definition for tenant", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof)." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the decision definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/aKey/tenant-id/aTenantId/xml`", + "value": { + "id": "aDecisionDefinitionId", + "dmnXml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n \u003cdefinitions xmlns\u003d\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\"\n id\u003d\"definitions\"\n name\u003d\"camunda\"\n namespace\u003d\"http://camunda.org/schema/1.0/dmn\"\u003e\n \u003cdecision id\u003d\"testDecision\" name\u003d\"decision\"\u003e\n \u003cdecisionTable id\u003d\"table\"\u003e\n \u003coutput id\u003d\"result\" name\u003d\"result\" \u003e\n \u003c/output\u003e\n \u003crule id\u003d\"rule\"\u003e\n \u003coutputEntry id\u003d\"output1\"\u003e\n \u003ctext\u003e\"not okay\"\u003c/text\u003e\n \u003c/outputEntry\u003e\n \u003c/rule\u003e\n \u003c/decisionTable\u003e\n \u003c/decision\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}/xml": { + "get": { + "operationId": "getDecisionDefinitionDmnXmlByKey", + "tags": [ + "Decision Definition" + ], + "summary": "Get XML By Key", + "description": "Retrieves the XML for the latest version of the decision definition which belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof)." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/aKey/xml`", + "value": { + "id": "aDecisionDefinitionId", + "dmnXml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n \u003cdefinitions xmlns\u003d\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\"\n id\u003d\"definitions\"\n name\u003d\"camunda\"\n namespace\u003d\"http://camunda.org/schema/1.0/dmn\"\u003e\n \u003cdecision id\u003d\"testDecision\" name\u003d\"decision\"\u003e\n \u003cdecisionTable id\u003d\"table\"\u003e\n \u003coutput id\u003d\"result\" name\u003d\"result\" \u003e\n \u003c/output\u003e\n \u003crule id\u003d\"rule\"\u003e\n \u003coutputEntry id\u003d\"output1\"\u003e\n \u003ctext\u003e\"not okay\"\u003c/text\u003e\n \u003c/outputEntry\u003e\n \u003c/rule\u003e\n \u003c/decisionTable\u003e\n \u003c/decision\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/{id}": { + "get": { + "operationId": "getDecisionDefinitionById", + "tags": [ + "Decision Definition" + ], + "summary": "Get Decision Definition By Id", + "description": "Retrieves a decision definition by id, according to the `DecisionDefinition` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision definition to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/aDecisionDefinitionId`", + "value": { + "id": "aDecisionDefinitionId", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey": "dish", + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5 + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/{id}/diagram": { + "get": { + "operationId": "getDecisionDefinitionDiagram", + "tags": [ + "Decision Definition" + ], + "summary": "Get Diagram", + "description": "Retrieves the diagram of a decision definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The decision definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/{id}/evaluate": { + "post": { + "operationId": "evaluateDecisionById", + "tags": [ + "Decision Definition" + ], + "summary": "Evaluate By Id", + "description": "Evaluates a given decision and returns the result.\nThe input values of the decision have to be supplied in the request body.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision definition to be evaluated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluateDecisionDto" + }, + "examples": { + "example-1": { + "summary": "POST /decision-definition/aDecisionDefinitionId/evaluate", + "value": { + "variables": { + "amount": { + "value": 600, + "type": "Double" + }, + "invoiceCategory": { + "value": "Misc", + "type": "String" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/decision-definition/aDecisionDefinitionId/evaluate`", + "value": [ + { + "result": { + "value": "management", + "type": "String", + "valueInfo": null + } + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/{id}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByDecisionDefinitionId", + "tags": [ + "Decision Definition" + ], + "summary": "Update History Time to Live", + "description": "Updates history time to live for decision definition.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision definition to change history time to live." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/decision-definition/aDecisionDefinitionId/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/{id}/xml": { + "get": { + "operationId": "getDecisionDefinitionDmnXmlById", + "tags": [ + "Decision Definition" + ], + "summary": "Get XML By Id", + "description": "Retrieves the DMN XML of a decision definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/aDecisionDefinitionId/xml`", + "value": { + "id": "aDecisionDefinitionId", + "dmnXml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n \u003cdefinitions xmlns\u003d\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\"\n id\u003d\"definitions\"\n name\u003d\"camunda\"\n namespace\u003d\"http://camunda.org/schema/1.0/dmn\"\u003e\n \u003cdecision id\u003d\"testDecision\" name\u003d\"decision\"\u003e\n \u003cdecisionTable id\u003d\"table\"\u003e\n \u003coutput id\u003d\"result\" name\u003d\"result\" \u003e\n \u003c/output\u003e\n \u003crule id\u003d\"rule\"\u003e\n \u003coutputEntry id\u003d\"output1\"\u003e\n \u003ctext\u003e\"not okay\"\u003c/text\u003e\n \u003c/outputEntry\u003e\n \u003c/rule\u003e\n \u003c/decisionTable\u003e\n \u003c/decision\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-requirements-definition": { + "get": { + "operationId": "getDecisionRequirementsDefinitions", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Definitions", + "description": "Queries for decision requirements definitions that fulfill given parameters.\nParameters may be the properties of decision requirements definitions, such as the name,\nkey or version. The size of the result set can be retrieved by using the\n[Get Decision Requirements Definition Count](https://docs.camunda.org/manual/7.22/reference/rest/decision-requirements-definition/get-query-count/)\nmethod.", + "parameters": [ + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition id." + }, + { + "name": "decisionRequirementsDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the deployment a decision requirement definition belongs to." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition key, i.e., the id in the DMN 1.3 XML. Exact\nmatch." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition categories that the parameter is a substring\nof." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by decision requirements definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those decision requirements definitions that are latest versions. Value may\nonly be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision requirements definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those decision requirements definition resources that the parameter is\na substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A decision requirements definition must\nhave one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision requirements definitions which belong to no tenant. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "includeDecisionRequirementsDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include decision requirements definitions which belong to no tenant. Can be used in\ncombination with `tenantIdIn`. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "id", + "key", + "name", + "version", + "deploymentId", + "category", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition?key\u003ddish\u0026sortBy\u003dversion\u0026sortOrder\u003dasc`", + "description": "GET `/decision-requirements-definition?key\u003ddish\u0026sortBy\u003dversion\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "key": "dish", + "category": "drd-test", + "name": "Dish", + "version": 1, + "resource": "dish.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if\na `sortOrder` parameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/count": { + "get": { + "operationId": "getDecisionRequirementsDefinitionsCount", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Definition Count", + "description": "Requests the number of decision requirements definitions that fulfill the query\ncriteria.\nTakes the same filtering parameters as the\n[Get Decision Requirements Definitions](https://docs.camunda.org/manual/7.22/reference/rest/decision-requirements-definition/get-query/)\nmethod.", + "parameters": [ + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition id." + }, + { + "name": "decisionRequirementsDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the deployment a decision requirement definition belongs to." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition key, i.e., the id in the DMN 1.3 XML. Exact\nmatch." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition categories that the parameter is a substring\nof." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by decision requirements definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those decision requirements definitions that are latest versions. Value may\nonly be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision requirements definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those decision requirements definition resources that the parameter is\na substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A decision requirements definition must\nhave one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision requirements definitions which belong to no tenant. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "includeDecisionRequirementsDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include decision requirements definitions which belong to no tenant. Can be used in\ncombination with `tenantIdIn`. Value may only be `true`, as `false` is the\ndefault behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/count?key\u003ddish`", + "description": "GET `/decision-requirements-definition/count?key\u003ddish`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if\na `sortOrder` parameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/key/{key}": { + "get": { + "operationId": "getDecisionRequirementsDefinitionByKey", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Definition by Key", + "description": "Retrieves a decision requirements definition according to the\n`DecisionRequirementsDefinition` interface in the engine. \nReturns the latest version of the decision requirements definition \nwhich belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey`", + "description": "GET `/decision-requirements-definition/key/invoiceKey`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "key": "invoiceKey", + "category": "invoice", + "name": "receiptInvoice", + "version": 2, + "resource": "invoice.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/key/{key}/diagram": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDiagramByKey", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Diagram by Key", + "description": "Retrieves the diagram of a decision requirements definition.\nReturns the diagram for the latest version of the decision requirements \ndefinition which belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be\nretrieved." + } + ], + "responses": { + "200": { + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `image/*` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "value": "" + } + } + }, + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/octet-stream` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "value": "" + } + } + } + }, + "description": "The image diagram of the decision requirements definition." + }, + "204": { + "description": "The decision requirements definition doesn\u0027t have an associated diagram. This\nmethod returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}": { + "get": { + "operationId": "getDecisionRequirementsDefinitionByKeyAndTenantId", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Definition by Key and Tenant ID", + "description": "Retrieves a decision requirements definition according to the\n`DecisionRequirementsDefinition` interface in the engine.\nReturns the latest version of the decision requirements definition \nfor a tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant to which the decision requirements definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey`/tenant-id/tenantA", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "key": "invoiceKey", + "category": "invoice", + "name": "receiptInvoice", + "version": 2, + "resource": "invoice.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": "tenantA" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/diagram": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDiagramByKeyAndTenantId", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Diagram by Key and Tenant ID", + "description": "Retrieves the diagram of a decision requirements definition.\nReturns the diagram of the latest version of the decision requirements \ndefinition for a tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be\nretrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant to which the decision requirements definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `image/*` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "value": "" + } + } + }, + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/octet-stream` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "value": "" + } + } + } + }, + "description": "The image diagram of the decision requirements definition." + }, + "204": { + "description": "The decision requirements definition doesn\u0027t have an associated diagram. This\nmethod returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/xml": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDmnXmlByKeyAndTenantId", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get DMN XML by Key and Tenant ID", + "description": "Retrieves the DMN XML of a decision requirements definition.\nReturns the XML of the latest version of the decision requirements \ndefinition for a tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be\nretrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant to which the decision requirements definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionXmlDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/xml`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/xml`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "dmnXml": "\u003c?xml version\u003d\"1.1\" encoding\u003d\"UTF-8\"?\u003e...\u003cdefinitions id\u003d\"dish\" name\u003d\"Dish\" namespace\u003d\"test-drg\" ... /\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nDecision requirements definition with given id or key does not\nexist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/decision-requirements-definition/key/{key}/xml": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDmnXmlByKey", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get DMN XML by Key", + "description": "Retrieves the DMN XML of a decision requirements definition.\nReturns the XML for the latest version of the decision requirements \ndefinition which belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be\nretrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionXmlDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/xml`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/xml`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "dmnXml": "\u003c?xml version\u003d\"1.1\" encoding\u003d\"UTF-8\"?\u003e...\u003cdefinitions id\u003d\"dish\" name\u003d\"Dish\" namespace\u003d\"test-drg\" ... /\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nDecision requirements definition with given id or key does not\nexist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/decision-requirements-definition/{id}": { + "get": { + "operationId": "getDecisionRequirementsDefinitionById", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Definition by ID", + "description": "Retrieves a decision requirements definition according to the\n`DecisionRequirementsDefinition` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision requirements definition to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "key": "invoiceKey", + "category": "invoice", + "name": "receiptInvoice", + "version": 2, + "resource": "invoice.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/{id}/diagram": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDiagramById", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Diagram by ID", + "description": "Retrieves the diagram of a decision requirements definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision requirements definition." + } + ], + "responses": { + "200": { + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `image/*` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "value": "" + } + } + }, + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/octet-stream` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "value": "" + } + } + } + }, + "description": "The image diagram of the decision requirements definition." + }, + "204": { + "description": "The decision requirements definition doesn\u0027t have an associated diagram. This\nmethod returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/{id}/xml": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDmnXmlById", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get DMN XML by ID", + "description": "Retrieves the DMN XML of a decision requirements definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision requirements definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionXmlDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/xml`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/xml`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "dmnXml": "\u003c?xml version\u003d\"1.1\" encoding\u003d\"UTF-8\"?\u003e...\u003cdefinitions id\u003d\"dish\" name\u003d\"Dish\" namespace\u003d\"test-drg\" ... /\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment": { + "get": { + "operationId": "getDeployments", + "tags": [ + "Deployment" + ], + "summary": "Get List", + "description": "Queries for deployments that fulfill given parameters. Parameters may be the properties of deployments,\nsuch as the id or name or a range of the deployment time. The size of the result set can be retrieved by\nusing the [Get Deployment count](https://docs.camunda.org/manual/7.22/reference/rest/deployment/get-query-count/) method.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id" + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment name. Exact match." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment name that the parameter is a substring of. The parameter can include the\nwildcard `%` to express like-strategy such as: starts with (`%`name), ends with (name`%`) or contains\n(`%`name`%`)." + }, + { + "name": "source", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment source." + }, + { + "name": "withoutSource", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Filter by the deployment source whereby source is equal to `null`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A deployment must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include deployments which belong to no tenant. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "includeDeploymentsWithoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Include deployments which belong to no tenant. Can be used in combination with `tenantIdIn`. Value may\nonly be `true`, as `false` is the default behavior." + }, + { + "name": "after", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to all deployments after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "before", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to all deployments before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "id", + "name", + "deploymentTime", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeploymentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/deployment?name\u003ddeploymentName`", + "value": [ + { + "id": "someId", + "name": "deploymentName", + "source": "process application", + "tenantId": null, + "deploymentTime": "2013-04-23T13:42:43.000+0200" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`, or if an invalid operator for variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/count": { + "get": { + "operationId": "getDeploymentsCount", + "tags": [ + "Deployment" + ], + "summary": "Get List Count", + "description": "Queries for the number of deployments that fulfill given parameters. Takes the same parameters as the\n[Get Deployments](https://docs.camunda.org/manual/7.22/reference/rest/deployment/get-query/) method.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id" + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment name. Exact match." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment name that the parameter is a substring of. The parameter can include the\nwildcard `%` to express like-strategy such as: starts with (`%`name), ends with (name`%`) or contains\n(`%`name`%`)." + }, + { + "name": "source", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment source." + }, + { + "name": "withoutSource", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Filter by the deployment source whereby source is equal to `null`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A deployment must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include deployments which belong to no tenant. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "includeDeploymentsWithoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Include deployments which belong to no tenant. Can be used in combination with `tenantIdIn`. Value may\nonly be `true`, as `false` is the default behavior." + }, + { + "name": "after", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to all deployments after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "before", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to all deployments before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/deployment/count?name\u003ddeploymentName`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example, if an invalid operator for variable\ncomparison is used. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/create": { + "post": { + "operationId": "createDeployment", + "tags": [ + "Deployment" + ], + "summary": "Create", + "description": "Creates a deployment.\n\n**Security Consideration**\n\nDeployments can contain custom code in form of scripts or EL expressions to customize process behavior.\nThis may be abused for remote execution of arbitrary code.", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormDeploymentDto" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentWithDefinitionsDto" + }, + "examples": { + "example-1": { + "summary": "POST `/deployment/create`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/deployment/aDeploymentId", + "rel": "self" + } + ], + "id": "aDeploymentId", + "name": "aName", + "source": "process application", + "deploymentTime": "2013-01-23T13:59:43.000+0200", + "tenantId": null, + "deployedProcessDefinitions": { + "aProcDefId": { + "id": "aProcDefId", + "key": "aKey", + "category": "aCategory", + "description": "aDescription", + "name": "aName", + "version": 42, + "resource": "aResourceName", + "deploymentId": "aDeploymentId", + "diagram": "aResourceName.png", + "suspended": true, + "tenantId": null, + "versionTag": null + } + }, + "deployedCaseDefinitions": null, + "deployedDecisionDefinitions": null, + "deployedDecisionRequirementsDefinitions": null + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ParseExceptionDto" + }, + "examples": { + "example-1": { + "summary": "GET /deployment?name\u003ddeploymentName", + "value": { + "type": "ParseException", + "message": "ENGINE-09005 Could not parse BPMN process. Errors: Exclusive Gateway \u0027ExclusiveGateway_1\u0027 has outgoing sequence flow \u0027SequenceFlow_0\u0027 without condition which is not the default flow.", + "details": { + "invoice.bpmn": { + "errors": [ + { + "message": "Exclusive Gateway \u0027ExclusiveGateway_1\u0027 has outgoing sequence flow \u0027SequenceFlow_0\u0027 without condition which is not the default flow.", + "line": 77, + "column": 15, + "mainBpmnElementId": "ExclusiveGateway_1", + "bpmnElementIds": [ + "ExclusiveGateway_1", + "SequenceFlow_0" + ] + } + ], + "warnings": [ + { + "message": "It is not recommended to use a cancelling boundary timer event with a time cycle.", + "line": 87, + "column": 20, + "mainBpmnElementId": "BoundaryEvent_1", + "bpmnElementIds": [ + "BoundaryEvent_1" + ] + } + ] + } + } + } + } + } + } + }, + "description": "Bad Request. In case one of the bpmn resources cannot be parsed.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#parse-exceptions) for\nthe error response format." + } + } + } + }, + "/deployment/registered": { + "get": { + "operationId": "getRegisteredDeployments", + "tags": [ + "Deployment" + ], + "summary": "Get Registered Deployments", + "description": "Queries the registered deployment IDs for the current application.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [ + "deploymentId1", + "deploymentId2", + "deploymentId3" + ] + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/deployment/{id}": { + "delete": { + "operationId": "deleteDeployment", + "tags": [ + "Deployment" + ], + "summary": "Delete", + "description": "Deletes a deployment by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment to be deleted." + }, + { + "name": "cascade", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if all process instances, historic process instances and jobs for this deployment\nshould be deleted." + }, + { + "name": "skipCustomListeners", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if only the built-in ExecutionListeners should be notified with the end event." + }, + { + "name": "skipIoMappings", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if all input/output mappings should not be invoked." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "A Deployment with the provided id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getDeployment", + "tags": [ + "Deployment" + ], + "summary": "Get", + "description": "Retrieves a deployment by id, according to the `Deployment` interface of the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentDto" + }, + "examples": { + "example-1": { + "summary": "GET `/deployments/someDeploymentId`", + "value": { + "id": "someDeploymentId", + "name": "deploymentName", + "source": "process application", + "deploymentTime": "2013-04-23T13:42:43.000+0200" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Deployment with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/{id}/redeploy": { + "post": { + "operationId": "redeploy", + "tags": [ + "Deployment" + ], + "summary": "Redeploy", + "description": "Re-deploys an existing deployment.\n\nThe deployment resources to re-deploy can be restricted by using the properties `resourceIds` or\n`resourceNames`. If no deployment resources to re-deploy are passed then all existing resources of the\ngiven deployment are re-deployed.\n\n**Warning**: Deployments can contain custom code in form of scripts or EL expressions to customize\nprocess behavior. This may be abused for remote execution of arbitrary code. See the section on\n[security considerations for custom code](https://docs.camunda.org/manual/7.22/user-guide/process-engine/securing-custom-code/) in\nthe user guide for details.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment to re-deploy." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RedeploymentDto" + }, + "examples": { + "example-1": { + "summary": "POST `/deployment/anDeploymentId/redeploy`", + "value": { + "resourceIds": [ + "aResourceId" + ], + "resourceNames": [ + "aResourceName" + ], + "source": "cockpit" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentWithDefinitionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/deployment/aDeploymentId", + "rel": "self" + } + ], + "id": "aDeploymentId", + "name": "aName", + "source": "cockpit", + "deploymentTime": "2015-10-13T13:59:43.000+0200", + "tenantId": null, + "deployedProcessDefinitions": { + "aProcDefId": { + "id": "aProcDefId", + "key": "aKey", + "category": "aCategory", + "description": "aDescription", + "name": "aName", + "version": 42, + "resource": "aResourceName", + "deploymentId": "aDeploymentId", + "diagram": "aResourceName.png", + "suspended": true, + "tenantId": null, + "versionTag": null + } + }, + "deployedCaseDefinitions": null, + "deployedDecisionDefinitions": null, + "deployedDecisionRequirementsDefinitions": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Deployment or a deployment resource for the given deployment does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/{id}/resources": { + "get": { + "operationId": "getDeploymentResources", + "tags": [ + "Deployment" + ], + "summary": "Get Resources", + "description": "Retrieves all deployment resources of a given deployment.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment to retrieve the deployment resources for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeploymentResourceDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/deployment/anDeploymentId/resources`", + "value": [ + { + "id": "anResourceId", + "name": "anResourceName", + "deploymentId": "anDeploymentId" + }, + { + "id": "anotherResourceId", + "name": "anotherResourceName", + "deploymentId": "anDeploymentId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Deployment resources for the given deployment do not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/{id}/resources/{resourceId}": { + "get": { + "operationId": "getDeploymentResource", + "tags": [ + "Deployment" + ], + "summary": "Get Resource", + "description": "Retrieves a deployment resource by resource id for the given deployment.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment" + }, + { + "name": "resourceId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment resource" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentResourceDto" + }, + "examples": { + "example-1": { + "summary": "GET `/deployments/someDeploymentId/resources/someResourceId`", + "value": { + "id": "someResourceId", + "name": "someResourceName", + "deploymentId": "someDeploymentId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Deployment Resource with given resource id or deployment id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/{id}/resources/{resourceId}/data": { + "get": { + "operationId": "getDeploymentResourceData", + "tags": [ + "Deployment" + ], + "summary": "Get Resource (Binary)", + "description": "Retrieves the binary content of a deployment resource for the given deployment by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment." + }, + { + "name": "resourceId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment resource." + } + ], + "responses": { + "200": { + "description": "Request successful. The media type of the response depends on the filename.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For files without any MIME type information, a byte stream is returned." + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information are returned as the saved type. For example, a\n `process.bpmn` resource will have the media type `application/xml`." + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Deployment Resource with given resource id or deployment id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/engine": { + "get": { + "operationId": "getProcessEngineNames", + "tags": [ + "Engine" + ], + "summary": "Get List", + "description": "Retrieves the names of all process engines available on your platform.\n**Note**: You cannot prepend `/engine/{name}` to this method.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessEngineDto" + } + }, + "examples": { + "example-1": { + "value": [ + { + "name": "default" + }, + { + "name": "anotherEngineName" + } + ] + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/event-subscription": { + "get": { + "operationId": "getEventSubscriptions", + "tags": [ + "Event Subscription" + ], + "summary": "Get List", + "description": "Queries for event subscriptions that fulfill given parameters.\nThe size of the result set can be retrieved by using the\n[Get Event Subscriptions count](https://docs.camunda.org/manual/7.22/reference/rest/event-subscription/get-query-count/) method.", + "parameters": [ + { + "name": "eventSubscriptionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscription with the given id." + }, + { + "name": "eventName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions for events with the given name." + }, + { + "name": "eventType", + "in": "query", + "schema": { + "enum": [ + "message", + "signal", + "compensate", + "conditional" + ], + "type": "string" + }, + "description": "Only select subscriptions for events with the given type.\nValid values: `message`, `signal`, `compensate` and `conditional`." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to an execution with the given id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to a process instance with the given id." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to an activity with the given id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nOnly select subscriptions that belong to one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select subscriptions which have no tenant id.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "includeEventSubscriptionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Select event subscriptions which have no tenant id.\nCan be used in combination with tenantIdIn parameter.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "created", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventSubscriptionDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/event-subscription?eventType\u003dmessage\u0026sortBy\u003dcreated\u0026sortOrder\u003ddesc`", + "value": [ + { + "id": "anId", + "eventType": "message", + "eventName": "anEventName", + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "activityId": "anActivityId", + "createdDate": "2020-04-20T15:23:12.229+0200", + "tenantId": null + }, + { + "id": "anotherId", + "eventType": "message", + "eventName": "anotherEventName", + "executionId": "anotherExecutionId", + "processInstanceId": "anotherProcessInstanceId", + "activityId": "anotherActivityId", + "createdDate": "2020-04-20T15:20:12.229+0200", + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid,\nfor example if a `sortOrder` parameter is supplied, but no `sortBy`.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/event-subscription/count": { + "get": { + "operationId": "getEventSubscriptionsCount", + "tags": [ + "Event Subscription" + ], + "summary": "Get List Count", + "description": "Queries for the number of event subscriptions that fulfill given parameters.\nTakes the same parameters as the\n[Get Event Subscriptions](https://docs.camunda.org/manual/7.22/reference/rest/event-subscription/get-query/) method.", + "parameters": [ + { + "name": "eventSubscriptionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscription with the given id." + }, + { + "name": "eventName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions for events with the given name." + }, + { + "name": "eventType", + "in": "query", + "schema": { + "enum": [ + "message", + "signal", + "compensate", + "conditional" + ], + "type": "string" + }, + "description": "Only select subscriptions for events with the given type.\nValid values: `message`, `signal`, `compensate` and `conditional`." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to an execution with the given id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to a process instance with the given id." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to an activity with the given id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nOnly select subscriptions that belong to one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select subscriptions which have no tenant id.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "includeEventSubscriptionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Select event subscriptions which have no tenant id.\nCan be used in combination with tenantIdIn parameter.\nValue may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/event-subscription/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution": { + "get": { + "operationId": "getExecutions", + "tags": [ + "Execution" + ], + "summary": "Get Executions", + "description": "Queries for the executions that fulfill given parameters.\nParameters may be static as well as dynamic runtime properties of\nexecutions.\nThe size of the result set can be retrieved by using the [Get\nExecution Count](https://docs.camunda.org/manual/7.22/reference/rest/execution/get-query-count/)\nmethod.", + "parameters": [ + { + "name": "businessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the business key of the process instances the executions belong to." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the executions run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the executions run on." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process instance the execution belongs to." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the activity the execution currently executes." + }, + { + "name": "signalEventSubscriptionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only those executions that expect a signal of the given name." + }, + { + "name": "messageEventSubscriptionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only those executions that expect a message of the given name." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type. See the [User Guide](/manual/develop/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. An execution must have one of the given\ntenant ids." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include executions that have variables with certain values.\nVariable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` -\ngreater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or\nequal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include executions that belong to a process instance with variables with certain\nvalues.\nVariable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "instanceId", + "definitionKey", + "definitionId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExecutionDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/execution?variables\u003dmyVariable_eq_camunda`", + "value": [ + { + "id": "anId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryExecutions", + "tags": [ + "Execution" + ], + "summary": "Get Executions (POST)", + "description": "Queries for executions that fulfill given parameters through a JSON object.\nThis method is slightly more powerful than the [Get\nExecutions](https://docs.camunda.org/manual/7.22/reference/rest/execution/get-query/) method\nbecause it allows\nto filter by multiple instance and execution variables of types\n`String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution`", + "value": { + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId", + "sorting": [ + { + "sortBy": "definitionKey", + "sortOrder": "asc" + }, + { + "sortBy": "instanceId", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExecutionDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/execution`", + "value": [ + { + "id": "anId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/count": { + "get": { + "operationId": "getExecutionsCount", + "tags": [ + "Execution" + ], + "summary": "Get Execution Count", + "description": "Queries for the number of executions that fulfill given parameters.\nTakes the same parameters as the [Get\nExecutions](https://docs.camunda.org/manual/7.22/reference/rest/execution/get-query/) method.", + "parameters": [ + { + "name": "businessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the business key of the process instances the executions belong to." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the executions run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the executions run on." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process instance the execution belongs to." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the activity the execution currently executes." + }, + { + "name": "signalEventSubscriptionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only those executions that expect a signal of the given name." + }, + { + "name": "messageEventSubscriptionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only those executions that expect a message of the given name." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type. See the [User Guide](/manual/develop/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. An execution must have one of the given\ntenant ids." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include executions that have variables with certain values.\nVariable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` -\ngreater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or\nequal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include executions that belong to a process instance with variables with certain\nvalues.\nVariable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "GET `/execution/count?variables\u003dmyVariable_eq_camunda`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryExecutionsCount", + "tags": [ + "Execution" + ], + "summary": "Get Execution Count (POST)", + "description": "Queries for the number of executions that fulfill given parameters. This method\ntakes the same message body as the [Get Executions\nPOST](https://docs.camunda.org/manual/7.22/reference/rest/execution/post-query/) method and\ntherefore it is slightly more powerful than the [Get Execution\nCount](https://docs.camunda.org/manual/7.22/reference/rest/execution/get-query-count/) method.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution/count`", + "value": { + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "POST `/execution/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/{id}": { + "get": { + "operationId": "getExecution", + "tags": [ + "Execution" + ], + "summary": "Get Execution", + "description": "Retrieves an execution by id, according to the `Execution` interface in the\nengine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionDto" + }, + "examples": { + "example-1": { + "description": "GET `/execution/anExecutionId`", + "value": { + "id": "anExecutionId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Execution with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/{id}/create-incident": { + "post": { + "operationId": "createIncident", + "tags": [ + "Execution" + ], + "summary": "Create Incident", + "description": "Creates a custom incident with given properties.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to create a new incident for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIncidentDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution/anExecutionId/create-incident`", + "value": { + "incidentType": "aType", + "configuration": "aConfiguration" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IncidentDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/execution/anExecutionId/create-incident`", + "value": { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "incidentTimestamp": "2014-03-01T08:00:00.000+0200", + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "tenantId": null, + "incidentMessage": "anIncidentMessage", + "jobDefinitionId": "aJobDefinitionId" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the incident type is null, the execution does not exist or the\nexecution is not related to any activity." + } + } + } + }, + "/execution/{id}/localVariables": { + "get": { + "operationId": "getLocalExecutionVariables", + "tags": [ + "Execution" + ], + "summary": "Get Local Execution Variables", + "description": "Retrieves all variables of a given execution by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to retrieve the variables from." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically\nvariables that store custom Java objects) should be deserialized\non server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on\nserver side and transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean\nproperty introspection feature. Note that this requires the Java\nclasses of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its\nserialized format. For example, a variable that is serialized as\nXML will be returned as a JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of\nbackward compatibility, we recommend setting this parameter to\n`false` when developing web applications that are independent of\nthe Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/execution/anExecutionId/localVariables`", + "description": "GET `/execution/anExecutionId/localVariables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }, + "example-2": { + "summary": "GET `/execution/anExecutionId/localVariables?deserializeValues\u003dfalse`", + "description": "GET `/execution/anExecutionId/localVariables?deserializeValues\u003dfalse`", + "value": { + "aVariableKey": { + "value": "\u003cmyObj\u003e\u003cprop1\u003ea\u003c/prop1\u003e\u003cprop2\u003eb\u003c/prop2\u003e\u003c/myObj\u003e", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "description": "Request successful. Returns A JSON object of variables key-value pairs. Each key is a variable name and each value a VariableValueDto" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Execution with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "modifyLocalExecutionVariables", + "tags": [ + "Execution" + ], + "summary": "Update/Delete Local Execution Variables", + "description": "Updates or deletes the variables in the context of an execution by id. The updates\ndo not propagate upwards in the execution hierarchy.\nUpdates precede deletions. So, if a variable is updated AND deleted,\nthe deletion overrides the update.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to set variables for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchVariablesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution/anExecutionId/localVariables`", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Update or delete could not be executed, for example because the execution does not\nexist." + } + } + } + }, + "/execution/{id}/localVariables/{varName}": { + "delete": { + "operationId": "deleteLocalExecutionVariable", + "tags": [ + "Execution" + ], + "summary": "Delete Local Execution Variable", + "description": "Deletes a variable in the context of a given execution by id. Deletion does not\npropagate upwards in the execution hierarchy.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to delete the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to delete." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + } + } + }, + "get": { + "operationId": "getLocalExecutionVariable", + "tags": [ + "Execution" + ], + "summary": "Get Local Execution Variable", + "description": "Retrieves a variable from the context of a given execution by id. Does not traverse\nthe parent execution hierarchy.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to retrieve the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to get." + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically\nvariables that store custom Java objects) should be deserialized\non server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on\nserver side and transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean\nproperty introspection feature. Note that this requires the Java\nclasses of the variable value to be on the REST API\u0027s classpath.\nIf set to `false`, a serializable variable will be returned in its\nserialized format. For example, a variable that is serialized as\nXML will be returned as a JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of\nbackward compatibility, we recommend setting this parameter to\n`false` when developing web applications that are independent of\nthe Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "GET `/execution/anExecutionId/localVariables/aVarName`", + "description": "GET `/execution/anExecutionId/localVariables/aVarName`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }, + "example-2": { + "summary": "GET `/execution/anExecutionId/localVariables/aVarName?deserializeValue\u003dfalse`", + "description": "GET `/execution/anExecutionId/localVariables/aVarName?deserializeValue\u003dfalse`", + "value": { + "value": "\u003cmyobj\u003e\u003cprop1\u003ea\u003c/prop1\u003e\u003cprop2\u003eb\u003c/prop2\u003e\u003c/myobj\u003e", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "putLocalExecutionVariable", + "tags": [ + "Execution" + ], + "summary": "Put Local Execution Variable", + "description": "Sets a variable in the context of a given execution by id. Update does not\npropagate upwards in the execution hierarchy.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to set the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to set." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/execution/anExecutionId/localVariables/aVarName`", + "value": { + "value": "someValue", + "type": "String" + } + }, + "example-2": { + "summary": "PUT `/execution/anExecutionId/localVariables/aVarName`", + "value": { + "value": "\u003cmyobj\u003e\u003cprop1\u003ea\u003c/prop1\u003e\u003cprop2\u003eb\u003c/prop2\u003e\u003c/myobj\u003e", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/execution/{id}/localVariables/{varName}/data": { + "get": { + "operationId": "getLocalExecutionVariableBinary", + "tags": [ + "Execution" + ], + "summary": "Get Local Execution Variable (Binary)", + "description": "Retrieves a binary variable from the context of a given execution by id. Does not\ntraverse the parent execution hierarchy. Applicable for byte array and\nfile variables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to retrieve the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to get." + } + ], + "responses": { + "200": { + "description": "Request successful.\n For binary variables or files without any MIME type information, a byte stream is returned.\n File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "binary variable: Status 200", + "value": "Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "file variable: Status 200", + "value": "Content-Type: text/plain; charset\u003dUTF-8. Content-Disposition: attachment; filename\u003d\"someFile.txt\"" + } + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable instance with given id exists but is not a binary variable. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable instance with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "setLocalExecutionVariableBinary", + "tags": [ + "Execution" + ], + "summary": "Post Local Execution Variable (Binary)", + "description": "Sets the serialized value for a binary variable or the binary value for a file\nvariable in the context of a given execution by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to set the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to set." + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormVariableBinaryDto" + }, + "examples": { + "example-1": { + "summary": "Post binary content of a byte array variable", + "description": "POST /execution/anExecutionId/localVariables/aVarName/data", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"unspecified\"\n Content-Type: application/octet-stream\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n Bytes\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y--\n ```\n " + }, + "example-2": { + "summary": "Post the JSON serialization of a Java Class **(deprecated)**", + "description": "POST /execution/anExecutionId/localVariables/aVarName/data", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"\n Content-Type: application/json; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n [\"foo\", \"bar\"]\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"type\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n java.util.ArrayList\u003cjava.lang.Object\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y--\n ```\n " + }, + "example-3": { + "summary": "Post a text file", + "description": "POST /execution/anExecutionId/localVariables/aVarName/data", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"myFile.txt\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n File\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y--\n ```\n " + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if no filename is set. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/{id}/messageSubscriptions/{messageName}": { + "get": { + "operationId": "getMessageEventSubscription", + "tags": [ + "Execution" + ], + "summary": "Get Message Event Subscription", + "description": "Retrieves a message event subscription for a given execution by id and a message\nname.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution that holds the subscription." + }, + { + "name": "messageName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the message that the subscription corresponds to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventSubscriptionDto" + }, + "examples": { + "example-1": { + "description": "GET `/execution/anExecutionId/messageSubscriptions/someMessage`", + "value": { + "id": "anEventSubscriptionId", + "eventType": "message", + "eventName": "anEvent", + "executionId": "anExecutionId", + "processInstanceId": "aProcInstId", + "activityId": "anActivity", + "tenantId": null, + "createdDate": "2013-01-23T13:59:43.000+0200" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "A message subscription for the given name and execution does not exist.\nThis may either mean that the execution does not exist, or that\nit is not subscribed on such a message.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/{id}/messageSubscriptions/{messageName}/trigger": { + "post": { + "operationId": "triggerEvent", + "tags": [ + "Execution" + ], + "summary": "Trigger Message Event Subscription", + "description": "Delivers a message to a specific execution by id, to trigger an existing message\nevent subscription. Inject process variables as the message\u0027s\npayload.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to submit the message to." + }, + { + "name": "messageName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the message that the addressed subscription corresponds to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionTriggerDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution/anExecutionId/messageSubscriptions/someMessage/trigger`", + "value": { + "variables": { + "aVariable": { + "value": true, + "type": "Boolean" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The addressed execution has no pending message subscriptions for the given message.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/{id}/signal": { + "post": { + "operationId": "signalExecution", + "tags": [ + "Execution" + ], + "summary": "Trigger Execution", + "description": "Signals an execution by id. Can for example be used to explicitly skip user tasks\nor signal asynchronous continuations.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to signal." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionTriggerDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution/{id}/signal`", + "value": { + "variables": { + "myVariable": { + "value": "camunda", + "type": "String" + }, + "mySecondVariable": { + "value": 124, + "type": "Integer" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/external-task": { + "get": { + "operationId": "getExternalTasks", + "tags": [ + "External Task" + ], + "summary": "Get List", + "description": "Queries for the external tasks that fulfill given parameters. Parameters may be static as well as dynamic\nruntime properties of executions. The size of the result set can be retrieved by using the\n[Get External Task Count](https://docs.camunda.org/manual/7.22/reference/rest/external-task/get-query-count/) method.", + "parameters": [ + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task\u0027s id." + }, + { + "name": "externalTaskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the comma-separated list of external task ids." + }, + { + "name": "topicName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task topic." + }, + { + "name": "workerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + { + "name": "locked", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "notLocked", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently not locked (i.e., they have no lock or it has expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "withRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that have a positive (\u0026gt; 0) number of retries (or `null`). Value may only be\n`true`, as `false` matches any external task." + }, + { + "name": "noRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any\nexternal task." + }, + { + "name": "lockExpirationAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to external tasks that have a lock that expires after a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "lockExpirationBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to external tasks that have a lock that expires before a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the activity that an external task is created for." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the comma-separated list of ids of the activities that an external task is created for." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that an external task belongs to." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process instance that an external task belongs to." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process instance ids that an external task may belong to." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process definition that an external task belongs to." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nAn external task must have one of the given tenant ids." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active tasks. Value may only be `true`, as `false` matches any external task." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended tasks. Value may only be `true`, as `false` matches any external task." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority higher than or equal to the given value.\nValue must be a valid `long` value." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority lower than or equal to the given value.\nValue must be a valid `long` value." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "id", + "lockExpirationTime", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "taskPriority", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalTaskDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /external-task?topicName\u003daTopic", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 9, + "businessKey": "aBusinessKey" + }, + { + "activityId": "anotherActivityId", + "activityInstanceId": "anotherActivityInstanceId", + "errorMessage": "anotherErrorMessage", + "executionId": "anotherExecutionId", + "id": "anotherExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "anotherProcessDefinitionId", + "processDefinitionKey": "anotherProcessDefinitionKey", + "processInstanceId": "anotherProcessInstanceId", + "tenantId": null, + "retries": 1, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 3, + "businessKey": "aBusinessKey" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryExternalTasks", + "tags": [ + "External Task" + ], + "summary": "Get List (POST)", + "description": "Queries for external tasks that fulfill given parameters in the form of a JSON object.\n\nThis method is slightly more powerful than the\n[Get External Tasks](https://docs.camunda.org/manual/7.22/reference/rest/external-task/get-query/) method because it allows to\nspecify a hierarchical result sorting.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalTaskQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "sorting": [ + { + "sortBy": "processDefinitionKey", + "sortOrder": "asc" + }, + { + "sortBy": "lockExpirationTime", + "sortOrder": "desc" + }, + { + "sortBy": "createTime", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalTaskDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 9, + "businessKey": "aBusinessKey" + }, + { + "activityId": "anotherActivityId", + "activityInstanceId": "anotherActivityInstanceId", + "errorMessage": "anotherErrorMessage", + "executionId": "anotherExecutionId", + "id": "anotherExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "anotherProcessDefinitionKey", + "processInstanceId": "anotherProcessInstanceId", + "tenantId": null, + "retries": 1, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 3, + "businessKey": "aBusinessKey" + } + ] + } + } + } + }, + "description": "Request successful. The Response is a JSON array of external task objects." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/count": { + "get": { + "operationId": "getExternalTasksCount", + "tags": [ + "External Task" + ], + "summary": "Get List Count", + "description": "Queries for the number of external tasks that fulfill given parameters. Takes the same parameters as the\n[Get External Tasks](https://docs.camunda.org/manual/7.22/reference/rest/external-task/get-query/) method.", + "parameters": [ + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task\u0027s id." + }, + { + "name": "externalTaskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the comma-separated list of external task ids." + }, + { + "name": "topicName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task topic." + }, + { + "name": "workerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + { + "name": "locked", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "notLocked", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently not locked (i.e., they have no lock or it has expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "withRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that have a positive (\u0026gt; 0) number of retries (or `null`). Value may only be\n`true`, as `false` matches any external task." + }, + { + "name": "noRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any\nexternal task." + }, + { + "name": "lockExpirationAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to external tasks that have a lock that expires after a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "lockExpirationBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to external tasks that have a lock that expires before a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the activity that an external task is created for." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the comma-separated list of ids of the activities that an external task is created for." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that an external task belongs to." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process instance that an external task belongs to." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process instance ids that an external task may belong to." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process definition that an external task belongs to." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nAn external task must have one of the given tenant ids." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active tasks. Value may only be `true`, as `false` matches any external task." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended tasks. Value may only be `true`, as `false` matches any external task." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority higher than or equal to the given value.\nValue must be a valid `long` value." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority lower than or equal to the given value.\nValue must be a valid `long` value." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET /external-task/count?topicName\u003daTopic", + "value": { + "count": 42 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryExternalTasksCount", + "tags": [ + "External Task" + ], + "summary": "Get List Count (POST)", + "description": "Queries for the number of external tasks that fulfill given parameters. This method takes the same message\nbody as the [Get External Tasks (POST)](https://docs.camunda.org/manual/7.22/reference/rest/external-task/post-query/) method.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalTaskQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/count", + "value": { + "topicName": "aTopicName", + "withRetriesLeft": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/fetchAndLock": { + "post": { + "operationId": "fetchAndLock", + "tags": [ + "External Task" + ], + "summary": "Fetch and Lock", + "description": "Fetches and locks a specific number of external tasks for execution by a worker. Query can be restricted\nto specific task topics and for each task topic an individual lock time can be provided.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchExternalTasksDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/fetchAndLock (1)", + "description": "Request with variable filtering", + "value": { + "workerId": "aWorkerId", + "maxTasks": 2, + "usePriority": true, + "topics": [ + { + "topicName": "createOrder", + "lockDuration": 10000, + "variables": [ + "orderId" + ] + } + ] + } + }, + "example-2": { + "summary": "POST /external-task/fetchAndLock (2)", + "description": "Request with all variables included", + "value": { + "workerId": "aWorkerId", + "maxTasks": 2, + "usePriority": true, + "topics": [ + { + "topicName": "createOrder", + "lockDuration": 10000, + "processDefinitionId": "aProcessDefinitionId", + "tenantIdIn": "tenantOne" + } + ] + } + }, + "example-3": { + "summary": "POST /external-task/fetchAndLock (3)", + "description": "Request with includeExtensionProperties", + "value": { + "workerId": "aWorkerId", + "maxTasks": 1, + "usePriority": true, + "topics": [ + { + "topicName": "createOrder", + "lockDuration": 10000, + "includeExtensionProperties": true + } + ] + } + }, + "example-4": { + "summary": "POST /external-task/fetchAndLock (4)", + "description": "Request with order by priority \u0026 createTime", + "value": { + "workerId": "aWorkerId", + "maxTasks": 2, + "usePriority": true, + "sorting": [ + { + "sortBy": "createTime", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LockedExternalTaskDto" + } + }, + "examples": { + "example-1": { + "summary": "POST /external-task/fetchAndLock (1)", + "description": "Request with variable filtering", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "workerId": "aWorkerId", + "priority": 4, + "topicName": "createOrder", + "variables": { + "orderId": { + "type": "String", + "value": "1234", + "valueInfo": {} + } + } + }, + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anotherErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "workerId": "aWorkerId", + "priority": 0, + "topicName": "createOrder", + "variables": { + "orderId": { + "type": "String", + "value": "3456", + "valueInfo": {} + } + } + } + ] + }, + "example-2": { + "summary": "POST /external-task/fetchAndLock (2)", + "description": "Request with all variables included", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.00+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": "tenantOne", + "retries": 3, + "workerId": "aWorkerId", + "priority": 4, + "topicName": "createOrder", + "businessKey": "aBusinessKey", + "variables": { + "orderId": { + "type": "String", + "value": "1234", + "valueInfo": {} + } + } + }, + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anotherErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "workerId": "aWorkerId", + "priority": 0, + "topicName": "createOrder", + "businessKey": "aBusinessKey", + "variables": { + "orderId": { + "type": "String", + "value": "3456", + "valueInfo": {} + } + } + } + ] + }, + "example-3": { + "summary": "POST /external-task/fetchAndLock (3)", + "description": "Request with includeExtensionProperties", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "retries": null, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "createOrder", + "tenantId": null, + "variables": {}, + "priority": 0, + "businessKey": "default", + "extensionProperties": { + "property2": "value2", + "property1": "value1" + } + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/retries": { + "put": { + "operationId": "setExternalTaskRetries", + "tags": [ + "External Task" + ], + "summary": "Set Retries Sync", + "description": "Sets the number of retries left to execute external tasks by id synchronously. If retries are set to 0, \nan incident is created.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetRetriesForExternalTasksDto" + }, + "examples": { + "example-1": { + "summary": "PUT /external-task/retries", + "value": { + "retries": 123, + "externalTaskIds": [ + "anExternalTask", + "anotherExternalTask" + ] + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case the number of retries is negative or null, an exception of type `InvalidRequestException` is\nreturned. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, \ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/retries-async": { + "post": { + "operationId": "setExternalTaskRetriesAsyncOperation", + "tags": [ + "External Task" + ], + "summary": "Set Retries Async", + "description": "Sets the number of retries left to execute external tasks by id asynchronously. If retries are set to 0,\nan incident is created.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetRetriesForExternalTasksDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/retries-async", + "value": { + "retries": 123, + "externalTaskIds": [ + "anExternalTask", + "anotherExternalTask" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If neither externalTaskIds nor externalTaskQuery are present or externalTaskIds contains null value or \nthe number of retries is negative or null, an exception of type `InvalidRequestException` is returned.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, \ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/topic-names": { + "get": { + "operationId": "getTopicNames", + "tags": [ + "External Task" + ], + "summary": "Get External Task Topic Names", + "description": "Queries for distinct topic names of external tasks that fulfill given parameters.\nQuery can be restricted to only tasks with retries left, tasks that are locked, or tasks\nthat are unlocked. The parameters withLockedTasks and withUnlockedTasks are\nexclusive. Setting them both to true will return an empty list.\nProviding no parameters will return a list of all distinct topic names with external tasks.", + "parameters": [ + { + "name": "withLockedTasks", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "withUnlockedTasks", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently not locked (i.e., they have no lock or it has expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "withRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that have a positive (\u0026gt; 0) number of retries (or `null`). Value may only be\n`true`, as `false` matches any external task." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "example-1": { + "summary": "GET /external-task/topic-names?withLockedTasks", + "value": [ + "topic-a", + "topic-b", + "topic-c" + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Returned if some of the query parameters are invalid." + } + } + } + }, + "/external-task/{id}": { + "get": { + "operationId": "getExternalTask", + "tags": [ + "External Task" + ], + "summary": "Get", + "description": "Retrieves an external task by id, corresponding to the `ExternalTask` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalTaskDto" + }, + "examples": { + "example-1": { + "summary": "GET /external-task/anExternalTaskId", + "value": { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "suspended": false, + "workerId": "aWorkerId", + "priority": 0, + "topicName": "aTopic", + "businessKey": "aBusinessKey" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "External task with the given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/bpmnError": { + "post": { + "operationId": "handleExternalTaskBpmnError", + "tags": [ + "External Task" + ], + "summary": "Handle BPMN Error", + "description": "Reports a business error in the context of a running external task by id. The error code must be specified\nto identify the BPMN error handler.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task in which context a BPMN error is reported." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalTaskBpmnError" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/anId/bpmnError", + "value": { + "workerId": "aWorker", + "errorCode": "bpmn-error", + "errorMessage": "anErrorMessage", + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task\u0027s most recent lock was not acquired by the provided worker.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the corresponding process instance could not be resumed successfully.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/complete": { + "post": { + "operationId": "completeExternalTaskResource", + "tags": [ + "External Task" + ], + "summary": "Complete", + "description": "Completes an external task by id and updates process variables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to complete." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompleteExternalTaskDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/anId/complete", + "value": { + "workerId": "aWorker", + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + }, + "localVariables": { + "aLocalVariable": { + "value": "aStringValue" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task\u0027s most recent lock was not acquired by the provided worker. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the corresponding process instance could not be resumed successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/errorDetails": { + "get": { + "operationId": "getExternalTaskErrorDetails", + "tags": [ + "External Task" + ], + "summary": "Get Error Details", + "description": "Retrieves the error details in the context of a running external task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task for which the error details should be retrieved." + } + ], + "responses": { + "200": { + "description": "Request successful.", + "content": { + "text/plain": { + "schema": { + "type": "string", + "description": "The error details for the external task." + }, + "examples": { + "example-1": { + "value": "org.apache.ibatis.jdbc.RuntimeSqlException: org.apache.ibatis.jdbc.RuntimeSqlException: test cause\n at org.camunda.bpm.engine.test.api.externaltask.ExternalTaskServiceTest.testHandleFailureWithErrorDetails(ExternalTaskServiceTest.java:1424)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n " + } + } + } + } + }, + "204": { + "description": "Request successful. In case the external task has no error details." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "An external task with the given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/extendLock": { + "post": { + "operationId": "extendLock", + "tags": [ + "External Task" + ], + "summary": "Extend Lock", + "description": "Extends the timeout of the lock by a given amount of time.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendLockOnExternalTaskDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/anId/extendLock", + "value": { + "workerId": "anId", + "newDuration": 100000 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case the new lock duration is negative or the external task is not locked by the given worker or not \nlocked at all, an exception of type `InvalidRequestException` is returned. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/failure": { + "post": { + "operationId": "handleFailure", + "tags": [ + "External Task" + ], + "summary": "Handle Failure", + "description": "Reports a failure to execute an external task by id. A number of retries and a timeout until the task can\nbe retried can be specified. If retries are set to 0, an incident for this task is created.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task to report a failure for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalTaskFailureDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/anId/failure", + "value": { + "workerId": "aWorker", + "errorMessage": "Does not compute", + "retries": 3, + "retryTimeout": 60000 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task\u0027s most recent lock was not acquired by the provided worker. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the corresponding process instance could not be resumed successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/lock": { + "post": { + "operationId": "lock", + "tags": [ + "External Task" + ], + "description": "Lock an external task by a given id for a specified worker and amount of time.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LockExternalTaskDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/anId/lock", + "value": { + "workerId": "anId", + "lockDuration": 100000 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case the lock duration is negative or the external task is already locked by\na different worker, an exception of type `InvalidRequestException` is returned. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/priority": { + "put": { + "operationId": "setExternalTaskResourcePriority", + "tags": [ + "External Task" + ], + "summary": "Set Priority", + "description": "Sets the priority of an existing external task by id. The default value of a priority is 0.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task to set the priority for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PriorityDto" + }, + "examples": { + "example-1": { + "summary": "PUT /external-task/anId/priority", + "value": { + "priority": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/retries": { + "put": { + "operationId": "setExternalTaskResourceRetries", + "tags": [ + "External Task" + ], + "summary": "Set Retries", + "description": "Sets the number of retries left to execute an external task by id. If retries are set to 0, an \nincident is created.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task to set the number of retries for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RetriesDto" + }, + "examples": { + "example-1": { + "summary": "PUT /external-task/anId/retries", + "value": { + "retries": 123 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case the number of retries is negative or null, an exception of type `InvalidRequestException`\nis returned. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/unlock": { + "post": { + "operationId": "unlock", + "tags": [ + "External Task" + ], + "summary": "Unlock", + "description": "Unlocks an external task by id. Clears the task\u0027s lock expiration time and worker id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task to unlock." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/filter": { + "get": { + "operationId": "getFilterList", + "tags": [ + "Filter" + ], + "summary": "Get Filters", + "description": "Queries for a list of filters using a list of parameters. The size of the result\nset can be retrieved\nby using the [Get Filter Count](https://docs.camunda.org/manual/7.22/reference/rest/filter/get-query-count/) method.", + "parameters": [ + { + "name": "filterId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the filter." + }, + { + "name": "resourceType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the resource type of the filter, e.g., `Task`." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the filter." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "owner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the user id of the owner of the filter." + }, + { + "name": "itemCount", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, each filter result will contain an `itemCount` property\nwith the number of items matched by the filter itself." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "filterId", + "resourceType", + "name", + "owner" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterDto" + } + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter?resourceType\u003dTask`", + "value": [ + { + "id": "aFilter", + "resourceType": "Task", + "name": "My Filter", + "owner": "jonny1", + "query": { + "assignee": "jonny1" + }, + "properties": { + "color": "#58FA58", + "description": "Filters assigned to me" + } + }, + { + "id": "anotherFilter", + "resourceType": "Task", + "name": "Accountants Filter", + "owner": "demo", + "query": { + "candidateGroup": "accountant" + }, + "properties": { + "description": "Filters assigned to me", + "priority": 10 + } + } + ] + }, + "example-2": { + "summary": "request with itemCount", + "description": "GET `/filter?resourceType\u003dTask\u0026itemCount\u003dtrue`", + "value": [ + { + "id": "aFilter", + "resourceType": "Task", + "name": "My Filter", + "owner": "jonny1", + "query": { + "assignee": "jonny1" + }, + "properties": { + "color": "#58FA58", + "description": "Filters assigned to me" + }, + "itemCount": 13 + }, + { + "id": "anotherFilter", + "resourceType": "Task", + "name": "Accountants Filter", + "owner": "demo", + "query": { + "candidateGroup": "accountant" + }, + "properties": { + "description": "Filters assigned to me", + "priority": 10 + }, + "itemCount": 42 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nReturned if some of the query parameters are invalid, for example if\na `sortOrder`\nparameter is supplied, but no `sortBy` is specified. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + }, + "options": { + "operationId": "filterResourceOptions", + "tags": [ + "Filter" + ], + "summary": "Filter Resource Options", + "description": "The OPTIONS request allows you to check for the set of available operations \nthat the currently authenticated user can perform on the `/filter` resource.\nWhether the user can perform an operation or not may depend on various\nfactors, including the users authorizations to interact with this\nresource and the internal configuration of the process engine.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "OPTIONS `/filter`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/filter/create", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/filter/count": { + "get": { + "operationId": "getFilterCount", + "tags": [ + "Filter" + ], + "summary": "Get Filter Count", + "description": "Retrieves the number of filters that fulfill a provided query. Corresponds to the\nsize of the result set when using the \n[Get Filters](https://docs.camunda.org/manual/7.22/reference/rest/filter/get-query/) method.", + "parameters": [ + { + "name": "filterId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the filter." + }, + { + "name": "resourceType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the resource type of the filter, e.g., `Task`." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the filter." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "owner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the user id of the owner of the filter." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter/count?resourceType\u003dTask\u0026owner\u003daUserId`", + "value": { + "count": 3 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nReturned if some of the query parameters are invalid, for example if\na `sortOrder`parameter is supplied, but no `sortBy`, or if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/filter/create": { + "post": { + "operationId": "createFilter", + "tags": [ + "Filter" + ], + "summary": "Create Filter", + "description": "Creates a new filter.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFilterDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `/filter/create`", + "value": { + "resourceType": "Task", + "name": "Accounting Tasks", + "owner": "jonny1", + "query": { + "candidateGroup": "accounting" + }, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `/filter/create`", + "value": { + "id": "aFilterId", + "resourceType": "Task", + "name": "Accounting Tasks", + "owner": "jonny1", + "query": { + "candidateGroup": "accounting" + }, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + } + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter was invalid. See\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to create a new filter. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/filter/{id}": { + "delete": { + "operationId": "deleteFilter", + "tags": [ + "Filter" + ], + "summary": "Delete Filter", + "description": "Deletes a filter by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to delete this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter cannot be found. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + }, + "get": { + "operationId": "getSingleFilter", + "tags": [ + "Filter" + ], + "summary": "Get Single Filter", + "description": "Retrieves a single filter by id, according to the `Filter` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to be retrieved." + }, + { + "name": "itemCount", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, each filter result will contain an `itemCount`\nproperty with the number of items matched by the filter itself." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter/aFilterId`", + "value": { + "id": "9917d731-3cde-11e4-b704-f0def1e59da8", + "name": "Accounting Tasks", + "owner": null, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + }, + "query": { + "candidateGroup": "accounting" + }, + "resourceType": "Task" + } + }, + "example-2": { + "summary": "request with itemCount", + "description": "GET `/filter/aFilterId?itemCount\u003dtrue`", + "value": { + "id": "9917d731-3cde-11e4-b704-f0def1e59da8", + "name": "Accounting Tasks", + "owner": null, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + }, + "query": { + "candidateGroup": "accounting" + }, + "resourceType": "Task", + "itemCount": 23 + } + } + } + } + }, + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authenticated user is unauthorized to read this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Filter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "filterResourceOptionsSingle", + "tags": [ + "Filter" + ], + "summary": "Filter Resource Options", + "description": "The OPTIONS request allows you to check for the set of available operations \nthat the currently authenticated user can perform on the `/filter` resource.\nWhether the user can perform an operation or not may depend on various\nfactors, including the users authorizations to interact with this\nresource and the internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to be checked." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "OPTIONS `/filter/aFilterId`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter/aFilterId", + "rel": "self" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/singleResult", + "rel": "singleResult" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/singleResult", + "rel": "singleResult" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/list", + "rel": "list" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/list", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/count", + "rel": "count" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/filter/aFilterId", + "rel": "update" + }, + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/filter/aFilterId", + "rel": "delete" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + }, + "put": { + "operationId": "updateFilter", + "tags": [ + "Filter" + ], + "summary": "Update Filter", + "description": "Updates an existing filter.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFilterDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "PUT `/filter/aFilterID`", + "value": { + "resourceType": "Task", + "name": "My Tasks", + "owner": "jonny1", + "query": { + "assignee": "jonny1" + }, + "properties": { + "color": "#99CCFF", + "description": "Tasks assigned to me", + "priority": -10 + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter was invalid. See\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to update this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter cannot be found. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/filter/{id}/count": { + "get": { + "operationId": "executeFilterCount", + "tags": [ + "Filter" + ], + "summary": "Execute Filter Count", + "description": "Executes the saved query of the filter by id and returns the count.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter/aTaskFilterId/count`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + }, + "post": { + "operationId": "postExecuteFilterCount", + "tags": [ + "Filter" + ], + "summary": "Execute Filter Count (POST)", + "description": "Executes the saved query of the filter by id and returns the count. This method is\nslightly more powerful then the [Get Execute Filter Count](https://docs.camunda.org/manual/7.22/reference/rest/filter/get-execute-count/) \nmethod because it allows to extend the saved query of the filter.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + } + ], + "requestBody": { + "description": "A JSON object which corresponds to the type of the saved query of the filter, i.e., if the resource type of the filter is Task the body should form a valid task query corresponding to the Task resource.", + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`. Note: The examples show a task filter. So the request body corresponds to a task query. For other resource types the request body will differ.", + "value": { + "assignee": "jonny1", + "taskDefinitionKey": "aTaskKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe extending query was invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/filter/{id}/list": { + "get": { + "operationId": "executeFilterList", + "tags": [ + "Filter" + ], + "summary": "Execute Filter List", + "description": "Executes the saved query of the filter by id and returns the result list.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter/aTaskFilterId/list/?firstResult\u003d0\u0026maxResults\u003d2`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": [ + { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "id": "aTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + }, + { + "assignee": "demo", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T10:42:18.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "anotherExecutionId", + "followUp": null, + "formKey": null, + "id": "anotherTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "anotherProcessId", + "processInstanceId": "anotherProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "anotherTaskKey" + } + ] + } + } + } + }, + "description": "Request successful. A JSON array containing JSON objects corresponding to the matching entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible to specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + }, + "post": { + "operationId": "postExecuteFilterList", + "tags": [ + "Filter" + ], + "summary": "Execute Filter List (POST)", + "description": "Executes the saved query of the filter by id and returns the result list. This\nmethod is slightly more powerful then the \n[Get Execute FilterList](https://docs.camunda.org/manual/7.22/reference/rest/filter/get-execute-list/) method\nbecause it allows to extend the saved query of the filter.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "description": "A JSON object which corresponds to the type of the saved query of the filter, i.e., if the resource type of the filter is Task the body should form a valid task query corresponding to the Task resource.", + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `/filter/aTaskFilterId/list/?firstResult\u003d0\u0026maxResults\u003d2`. **Note**: The examples show a task filter. So the request body corresponds to a task query. For other resource types the request body will differ.", + "value": { + "assignee": "jonny1", + "taskDefinitionKey": "aTaskKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `/filter/aTaskFilterId/list/?firstResult\u003d0\u0026maxResults\u003d2`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": [ + { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "id": "aTaskId", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + } + ] + } + } + } + }, + "description": "Request successful. A JSON array containing JSON objects corresponding to the matching entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible to specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe extending query was invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/filter/{id}/singleResult": { + "get": { + "operationId": "executeFilterSingleResult", + "tags": [ + "Filter" + ], + "summary": "Execute Filter Single Result", + "description": "Executes the saved query of the filter by id and returns the single result.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter/aTaskFilterId/singleResult`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "id": "aTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + } + } + } + } + }, + "description": "Request successful. A JSON object corresponding to the matching entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible to specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + }, + "204": { + "description": "Request successful, but the result was empty. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe executed filter returned more than one single result. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + }, + "post": { + "operationId": "postExecuteFilterSingleResult", + "tags": [ + "Filter" + ], + "summary": "Execute Filter Single Result (POST)", + "description": "Executes the saved query of the filter by id and returns the single result. This method is slightly more\npowerful then the [Get Execute Filter Single Result](https://docs.camunda.org/manual/7.22/reference/rest/filter/get-execute-single-result/)\nmethod because it allows to extend the saved query of the filter.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + } + ], + "requestBody": { + "description": "A JSON object which corresponds to the type of the saved query of the filter, i.e., if the resource type of the filter is Task the body should form a valid task query corresponding to the Task resource.", + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`. **Note**: The examples show a task filter. So the request body corresponds to a task query. For other resource types the request body will differ.", + "value": { + "assignee": "jonny1", + "taskDefinitionKey": "aTaskKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "id": "aTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + } + } + } + } + }, + "description": "Request successful. A JSON object corresponding to the corresponding entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + }, + "204": { + "description": "Request successful, but the result was empty. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe executed filter returned more than one single result or the\nextending query was invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/group": { + "get": { + "operationId": "getQueryGroups", + "tags": [ + "Group" + ], + "summary": "Get List", + "description": "Queries for a list of groups using a list of parameters. The size of the result set can be retrieved\nby using the [Get Group Count](https://docs.camunda.org/manual/7.22/reference/rest/group/get-query-count) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "id", + "name", + "type" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the group." + }, + { + "name": "idIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma seperated list of group ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the group." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the group." + }, + { + "name": "member", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only retrieve groups where the given user id is a member of." + }, + { + "name": "memberOfTenant", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only retrieve groups which are members of the given tenant." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/group?name\u003dSales`", + "value": [ + { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableGroupOperations", + "tags": [ + "Group" + ], + "summary": "Group Resource Options", + "description": "The `/group` resource supports two custom OPTIONS requests, this one for the resource as such and one for\nindividual group instances. The OPTIONS request allows checking for the set of available operations that\nthe currently authenticated user can perform on the `/group` resource. If the user can perform an operation\nor not may depend on various things, including the users authorizations to interact with this resource and\nthe internal configuration of the process engine.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/group`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/group", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/group/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/group/create", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + }, + "post": { + "operationId": "postQueryGroups", + "tags": [ + "Group" + ], + "summary": "Get List (POST)", + "description": "Queries for a list of groups using a list of parameters.\nThe size of the result set can be retrieved by using the\n[Get Group Count (POST)](https://docs.camunda.org/manual/7.22/reference/rest/group/post-query-count/) method.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/group`", + "value": { + "name": "Sales" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/group`", + "value": [ + { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/group/count": { + "get": { + "operationId": "getGroupCount", + "tags": [ + "Group" + ], + "summary": "Get List Count", + "description": "Queries for groups using a list of parameters and retrieves the count.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the group." + }, + { + "name": "idIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma seperated list of group ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the group." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the group." + }, + { + "name": "member", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only retrieve groups where the given user id is a member of." + }, + { + "name": "memberOfTenant", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only retrieve groups which are members of the given tenant." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/group/count?name\u003dSales`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response\nformat." + } + } + }, + "post": { + "operationId": "queryGroupCount", + "tags": [ + "Group" + ], + "summary": "Get List Count (POST)", + "description": "Queries for groups using a list of parameters and retrieves the count.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/group/count`", + "value": { + "name": "Sales" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/group/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response\nformat." + } + } + } + }, + "/group/create": { + "post": { + "operationId": "createGroup", + "tags": [ + "Group" + ], + "summary": "Create Group", + "description": "Creates a new group.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupDto" + }, + "examples": { + "example-1": { + "summary": "POST `/group/create`", + "value": { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The group could not be created due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/group/{id}": { + "delete": { + "operationId": "deleteGroup", + "tags": [ + "Group" + ], + "summary": "Delete Group", + "description": "Deletes a group by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Group cannot be found. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for\nthe error response format." + } + } + }, + "get": { + "operationId": "getGroup", + "tags": [ + "Group" + ], + "summary": "Get Group", + "description": "Retrieves a group by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/group/sales`", + "value": { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Group with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableGroupInstanceOperations", + "tags": [ + "Group" + ], + "summary": "Group Resource Instance Options", + "description": "The `/group` resource supports two custom OPTIONS requests, one for the resource as such and this one for individual group instances.\nThe OPTIONS request allows checking for the set of available operations that the currently authenticated user can perform on the\n`/group/{id}` resource instance. If the user can perform an operation or not may depend on various things, including the users authorizations\nto interact with this resource and the internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/group/aGroupId`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/group/aGroupId", + "rel": "self" + }, + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/group/aGroupId", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/group/aGroupId", + "rel": "update" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + }, + "put": { + "operationId": "updateGroup", + "tags": [ + "Group" + ], + "summary": "Update Group", + "description": "Updates a given group by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/group/sales`", + "value": { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. No content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the group with the requested Id cannot be found." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The group could not be updated due to an internal server error.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error\nresponse format." + } + } + } + }, + "/group/{id}/members": { + "options": { + "operationId": "availableGroupMembersOperations", + "tags": [ + "Group" + ], + "summary": "Group Membership Resource Options", + "description": "The OPTIONS request allows checking for the set of available operations that the currently authenticated\nuser can perform on the resource. If the user can perform an operation or not may depend on various\nthings, including the users authorizations to interact with this resource and the internal configuration\nof the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "OPTIONS `/group/sales/members`", + "value": { + "links": [ + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/group/sales/members", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/group/sales/members", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/group/{id}/members/{userId}": { + "delete": { + "operationId": "deleteGroupMember", + "tags": [ + "Group" + ], + "summary": "Delete a Group Member", + "description": "Removes a member from a group.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + }, + { + "name": "userId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of user to remove from the group." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "createGroupMember", + "tags": [ + "Group" + ], + "summary": "Create Group Member", + "description": "Adds a member to a group.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + }, + { + "name": "userId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of user to add to the group." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an internal error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/activity-instance": { + "get": { + "operationId": "getHistoricActivityInstances", + "tags": [ + "Historic Activity Instance" + ], + "summary": "Get List", + "description": "Queries for historic activity instances that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Historic Activity Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/activity-instance/get-activity-instance-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "activityInstanceId", + "instanceId", + "executionId", + "activityId", + "activityName", + "activityType", + "startTime", + "endTime", + "duration", + "definitionId", + "occurrence", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "activityInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity instance id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that executed the activity instance." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity id (according to BPMN 2.0 XML)." + }, + { + "name": "activityName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity name (according to BPMN 2.0 XML)." + }, + { + "name": "activityType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity type." + }, + { + "name": "taskAssignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include activity instances that are user tasks and assigned to a given user." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "canceled", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include canceled activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "completeScope", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include activity instances which completed a scope.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of ids. An activity instance must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic activity instances that belong to no tenant. Value may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricActivityInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/activity-instance?activityType\u003duserTask\u0026taskAssignee\u003dpeter`", + "value": [ + { + "activityId": "anActivity", + "activityName": "anActivityName", + "activityType": "userTask", + "assignee": "peter", + "calledProcessInstanceId": "aHistoricCalledProcessInstanceId", + "calledCaseInstanceId": null, + "canceled": true, + "completeScope": false, + "durationInMillis": 2000, + "endTime": "2013-04-23T18:42:43.000+0200", + "executionId": "anExecutionId", + "id": "aHistoricActivityInstanceId", + "parentActivityInstanceId": "aHistoricParentActivityInstanceId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "startTime": "2013-04-23T11:20:43.000+0200", + "taskId": "aTaskId", + "tenantId": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricActivityInstances", + "tags": [ + "Historic Activity Instance" + ], + "summary": "Get List (POST)", + "description": "Queries for historic activity instances that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Historic Activity Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/activity-instance/get-activity-instance-query-count/) method.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricActivityInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/activity-instance`", + "value": { + "activityType": "userTask", + "taskAssignee": "peter", + "sorting": [ + { + "sortBy": "activityId", + "sortOrder": "asc" + }, + { + "sortBy": "executionId", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricActivityInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": [ + { + "activityId": "anActivity", + "activityName": "anActivityName", + "activityType": "userTask", + "assignee": "peter", + "calledProcessInstanceId": "aHistoricCalledProcessInstanceId", + "calledCaseInstanceId": null, + "canceled": true, + "completeScope": false, + "durationInMillis": 2000, + "endTime": "2013-04-23T18:42:43.000+0200", + "executionId": "anExecutionId", + "id": "aHistoricActivityInstanceId", + "parentActivityInstanceId": "aHistoricParentActivityInstanceId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "startTime": "2013-04-23T11:20:43.000+0200", + "taskId": "aTaskId", + "tenantId": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/activity-instance/count": { + "get": { + "operationId": "getHistoricActivityInstancesCount", + "tags": [ + "Historic Activity Instance" + ], + "summary": "Get List Count", + "description": "Queries for the number of historic activity instances that fulfill the given parameters.\nTakes the same parameters as the [Get Historic Activity Instance](https://docs.camunda.org/manual/7.22/reference/rest/history/activity-instance/get-activity-instance-query/) method.", + "parameters": [ + { + "name": "activityInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity instance id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that executed the activity instance." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity id (according to BPMN 2.0 XML)." + }, + { + "name": "activityName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity name (according to BPMN 2.0 XML)." + }, + { + "name": "activityType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity type." + }, + { + "name": "taskAssignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include activity instances that are user tasks and assigned to a given user." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "canceled", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include canceled activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "completeScope", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include activity instances which completed a scope.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of ids. An activity instance must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic activity instances that belong to no tenant. Value may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/activity-instance/count?activityType\u003duserTask`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricActivityInstancesCount", + "tags": [ + "Historic Activity Instance" + ], + "summary": "Get List Count (POST)", + "description": "Queries for the number of historic activity instances that fulfill the given parameters.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricActivityInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/activity-instance/count`", + "value": { + "activityType": "userTask" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/activity-instance/{id}": { + "get": { + "operationId": "getHistoricActivityInstance", + "tags": [ + "Historic Activity Instance" + ], + "summary": "Get", + "description": "Retrieves a historic activity instance by id, according to the `HistoricActivityInstance` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic activity instance to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricActivityInstanceDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/activity-instance/aActivityInstId`", + "value": { + "id": "aActivityInstId", + "activityId": "anActivity", + "activityName": "anActivityName", + "activityType": "userTask", + "assignee": "peter", + "calledProcessInstanceId": "aHistoricCalledProcessInstanceId", + "calledCaseInstanceId": null, + "canceled": true, + "completeScope": false, + "durationInMillis": 2000, + "endTime": "2013-04-23T18:42:43.000+0200", + "executionId": "anExecutionId", + "parentActivityInstanceId": "aHistoricParentActivityInstanceId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "startTime": "2013-04-23T11:20:43.000+0200", + "taskId": "aTaskId", + "tenantId": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not Found\nHistoric activity instance with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/batch": { + "get": { + "operationId": "getHistoricBatches", + "tags": [ + "Historic Batch" + ], + "summary": "Get Historic Batches", + "description": "Queries for historic batches that fulfill given parameters. Parameters may be\nthe properties of batches, such as the id or type. The\nsize of the result set can be retrieved by using the\n[Get Historic Batch Count](https://docs.camunda.org/manual/7.22/reference/rest/history/batch/get-query-count/)\nmethod.", + "parameters": [ + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "completed", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "\nFilter completed or not completed batches. If the value is\n`true`, only completed batches, i.e., end time is set, are\nreturned. Otherwise, if the value is `false`, only running\nbatches, i.e., end time is null, are returned." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A batch matches if it has one of the given\ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant. Value can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "batchId", + "startTime", + "endTime", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricBatchDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/batch?type\u003daBatchType\u0026completed\u003dtrue\u0026sortBy\u003dbatchId\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "createUserId": "aUserId", + "startTime": "2016-04-12T15:29:33.000+0200", + "endTime": "2016-04-12T16:23:34.000+0200", + "removalTime": "2016-04-15T16:23:34.000+0200" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nReturned if some of the query parameters are invalid, for example if\na `sortOrder` parameter is supplied, but no `sortBy`.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/history/batch/cleanable-batch-report": { + "get": { + "operationId": "getCleanableHistoricBatchesReport", + "tags": [ + "Historic Batch" + ], + "summary": "Get Cleanable Batch Report", + "description": "Retrieves a report about a historic batch operations relevant to history cleanup\n(see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)\n) so that you can tune the history time to live.\nThese reports include the count of the finished batches, cleanable\nbatches and type of the batch.\nThe size of the result set can be retrieved by using the\n[Get Cleanable Batch Report Count](https://docs.camunda.org/manual/7.22/reference/rest/history/batch/get-cleanable-batch-report-count/)\nmethod.\n\n**Please note:**\nThe history time to live for batch operations does not support [Multi-Tenancy](https://docs.camunda.org/manual/7.22/user-guide/process-engine/multi-tenancy.md).\nThe report will return an information for all batch operations (for all tenants) if you have permissions\nto see the history.\n", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "finished" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CleanableHistoricBatchReportResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/batch/cleanable-batch-report`", + "description": "GET `/history/batch/cleanable-batch-report`\n\n An array containing finished batches information relevant to history cleanup.", + "value": [ + { + "batchType": "instance-modification", + "historyTimeToLive": 5, + "finishedBatchCount": 100, + "cleanableBatchCount": 53 + }, + { + "batchType": "instance-deletion", + "historyTimeToLive": 5, + "finishedBatchCount": 1000, + "cleanableBatchCount": 13 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/batch/cleanable-batch-report/count": { + "get": { + "operationId": "getCleanableHistoricBatchesReportCount", + "tags": [ + "Historic Batch" + ], + "summary": "Get Cleanable Batch Report Count", + "description": "Queries for the number of report results about a historic batch operations relevant\nto history cleanup (see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)\n).\nTakes the same parameters as the\n[Get Cleanable Batch Report](https://docs.camunda.org/manual/7.22/reference/rest/history/batch/get-cleanable-batch-report/)\nmethod.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/batch/cleanable-batch-report/count`", + "description": "GET `/history/batch/cleanable-batch-report/count`", + "value": { + "count": 10 + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/batch/count": { + "get": { + "operationId": "getHistoricBatchesCount", + "tags": [ + "Historic Batch" + ], + "summary": "Get Historic Batch Count", + "description": "Requests the number of historic batches that fulfill the query criteria.\nTakes the same filtering parameters as the\n[Get Historic Batches](https://docs.camunda.org/manual/7.22/reference/rest/history/batch/get-query/)\nmethod.", + "parameters": [ + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "completed", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "\nFilter completed or not completed batches. If the value is\n`true`, only completed batches, i.e., end time is set, are\nreturned. Otherwise, if the value is `false`, only running\nbatches, i.e., end time is null, are returned." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A batch matches if it has one of the given\ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant. Value can effectively only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/batch/count?type\u003daBatchType`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nReturned if some of the query parameters are invalid, for example if\na `sortOrder` parameter is supplied, but no `sortBy`.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/history/batch/set-removal-time": { + "post": { + "operationId": "setRemovalTimeAsyncHistoricBatch", + "tags": [ + "Historic Batch" + ], + "summary": "Set Removal Time Async (POST)", + "description": "Sets the removal time to multiple historic batches asynchronously (batch).\n\nAt least __historicBatchIds__ or __historicBatchQuery__ has to be\nprovided. If both are provided,\nall instances matching query criterion and instances from the list\nwill be updated with a removal time.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetRemovalTimeToHistoricBatchesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/batch/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "historicBatchQuery": { + "completed": true + }, + "historicBatchIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/history/batch/set-removal-time`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "batch-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nRequest was unsuccessful due to a bad user request. This occurs if\nsome of the query parameters are invalid, e.g. if neither\nhistoricBatchIds nor historicBatchQuery is present or if no mode is\nspecified.\n\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/history/batch/{id}": { + "delete": { + "operationId": "deleteHistoricBatch", + "tags": [ + "Historic Batch" + ], + "summary": "Delete Historic Batch", + "description": "Deletes a historic batch by id, including related historic job logs.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the batch to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic batch with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getHistoricBatch", + "tags": [ + "Historic Batch" + ], + "summary": "Get Historic Batch", + "description": "Retrieves a historic batch by id, according to the `HistoricBatch` interface in the\nengine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic batch to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricBatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/batch/aBatchId`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "size": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "createUserId": "aUserId", + "startTime": "2016-04-12T15:29:33.000+0200", + "endTime": "2016-04-12T16:23:34.000+0200", + "removalTime": "2016-04-15T16:23:34.000+0200" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nHistoric batch with given id does not exist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/history/cleanup": { + "post": { + "operationId": "cleanupAsync", + "tags": [ + "History Cleanup" + ], + "summary": "Clean up history (POST)", + "description": "Schedules asynchronous history cleanup (See\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).\n\n**Note:** This endpoint will return at most a single history cleanup job.\nSince version `7.9.0` it is possible to configure multiple\n[parallel history cleanup jobs](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#parallel-execution). Use\n[`GET /history/cleanup/jobs`](https://docs.camunda.org/manual/7.22/reference/rest/history/history-cleanup/get-history-cleanup-jobs)\nto find all the available history cleanup jobs.", + "parameters": [ + { + "name": "immediatelyDue", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "When true the job will be scheduled for nearest future. When `false`, the job will be\nscheduled for next batch window start time. Default is `true`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/cleanup?immediatelyDue\u003dfalse`", + "description": "POST `/history/cleanup?immediatelyDue\u003dfalse`", + "value": { + "id": "074bd92a-1a95-11e7-8ceb-34f39ab71d4e", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2017-04-01T09:45:15.039+0100" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid or the engine\ndoes not participate in history cleanup. See\n[Cleanup Execution Participation per Node](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#cleanup-execution-participation-per-node)." + } + } + } + }, + "/history/cleanup/configuration": { + "get": { + "operationId": "getHistoryCleanupConfiguration", + "tags": [ + "History Cleanup" + ], + "summary": "Get History Cleanup Configuration", + "description": "Retrieves history cleanup batch window configuration (See\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryCleanupConfigurationDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/cleanup/configuration`", + "description": "GET `/history/cleanup/configuration`", + "value": { + "batchWindowStartTime": "2017-09-11T23:59:00.000+0200", + "batchWindowEndTime": "2017-09-12T02:00:00.000+0200", + "enabled": "true" + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/history/cleanup/job": { + "get": { + "deprecated": true, + "operationId": "findCleanupJob", + "tags": [ + "History Cleanup" + ], + "summary": "Find clean up history job (GET)", + "description": "**Deprecated!** Use `GET /history/cleanup/jobs` instead.\n\nFinds history cleanup job (See\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/cleanup/job`", + "description": "GET `/history/cleanup/job`", + "value": { + "id": "074bd92a-1a95-11e7-8ceb-34f39ab71d4e", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2017-05-05T17:00:00+0200" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "History clean up job does not exist." + } + } + } + }, + "/history/cleanup/jobs": { + "get": { + "operationId": "findCleanupJobs", + "tags": [ + "History Cleanup" + ], + "summary": "Find clean up history jobs (GET)", + "description": "Finds history cleanup jobs (See\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/cleanup/jobs`", + "description": "GET `/history/cleanup/jobs`", + "value": [ + { + "id": "aJobId", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "aDueDate", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200" + }, + { + "id": "anotherJobId", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "anotherDueDate", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "History clean up jobs are empty." + } + } + } + }, + "/history/decision-definition/cleanable-decision-instance-report": { + "get": { + "operationId": "getCleanableHistoricDecisionInstanceReport", + "tags": [ + "Historic Decision Definition" + ], + "summary": "Get Cleanable Decision Instance Report", + "description": "Retrieves a report about a decision definition and finished decision instances\nrelevant to history cleanup (see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)), \nso that you can tune the history time to live.\nThese reports include the count of the finished historic decision\ninstances, cleanable decision instances and basic decision definition\ndata - id, key, name and version.\nThe size of the result set can be retrieved by using the \n[Get Cleanable Decision Instance Report Count](https://docs.camunda.org/manual/7.22/reference/rest/history/decision-definition/get-cleanable-decision-instance-report-count/) method.", + "parameters": [ + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition ids. Must be a comma-separated list of decision definition ids." + }, + { + "name": "decisionDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition keys. Must be a comma-separated list of decision definition keys." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A decision definition must have one of the given tenant \nids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which belong to no tenant. Value may only be `true`, as `false` \nis the default behavior." + }, + { + "name": "compact", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision instances which have more than zero finished instances. Value may only be `true`, \nas `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "finished" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CleanableHistoricDecisionInstanceReportResultDto" + } + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/history/decision-definition/cleanable-decision-instance-report`", + "value": [ + { + "decisionDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "decisionDefinitionKey": "invoice", + "decisionDefinitionName": "Invoice Receipt", + "decisionDefinitionVersion": 1, + "historyTimeToLive": 5, + "finishedDecisionInstanceCount": 100, + "cleanableDecisionInstanceCount": 53, + "tenantId": "aTenantId" + }, + { + "decisionDefinitionId": "invoice:2:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "decisionDefinitionKey": "invoice", + "decisionDefinitionName": "Invoice Receipt v2.0", + "decisionDefinitionVersion": 2, + "historyTimeToLive": 5, + "finishedDecisionInstanceCount": 1000, + "cleanableDecisionInstanceCount": 13, + "tenantId": "aTenantId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/history/decision-definition/cleanable-decision-instance-report/count": { + "get": { + "operationId": "getCleanableHistoricDecisionInstanceReportCount", + "tags": [ + "Historic Decision Definition" + ], + "summary": "Get Cleanable Decision Instance Report Count", + "description": "Queries for the number of report results about a decision definition and finished\ndecision instances relevant to history cleanup (see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).\nTakes the same parameters as the [Get Cleanable Decision Instance Report](https://docs.camunda.org/manual/7.22/reference/rest/history/decision-definition/get-cleanable-decision-instance-report/) \nmethod.", + "parameters": [ + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition ids. Must be a comma-separated list of decision definition ids." + }, + { + "name": "decisionDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition keys. Must be a comma-separated list of decision definition keys." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A decision definition must have one of the given tenant \nids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which belong to no tenant. Value may only be `true`, as `false` \nis the default behavior." + }, + { + "name": "compact", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision instances which have more than zero finished instances. Value may only be `true`, \nas `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/history/decision-definition/cleanable-decision-instance-report/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/history/decision-instance": { + "get": { + "operationId": "getHistoricDecisionInstances", + "tags": [ + "Historic Decision Instance" + ], + "summary": "Get Historic Decision Instances", + "description": "Queries for historic decision instances that fulfill the given parameters. \nThe size of the result set can be retrieved by using the \n[Get Historic Decision Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/decision-instance/get-decision-instance-query-count/) \nmethod.", + "parameters": [ + { + "name": "decisionInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision instance id." + }, + { + "name": "decisionInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision instance ids. Must be a comma-separated list of decision instance ids." + }, + { + "name": "decisionDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision definitions the instances belongs to. Must be a\ncomma-separated list of decision definition ids." + }, + { + "name": "decisionDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the keys of the decision definition the instances belongs to. Must be a comma-\nseparated list of decision definition keys." + }, + { + "name": "decisionDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition the instances belongs to, that the parameter\nis a substring of." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the instances belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances belongs to." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process instance the instances belongs to." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case definition the instances belongs to." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the case definition the instances belongs to." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case instance the instances belongs to." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity ids the instances belongs to.\nMust be a comma-separated list of acitvity ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity instance ids the instances belongs to.\nMust be a comma-separated list of acitvity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A historic decision instance must have one\nof the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic decision instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "evaluatedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were evaluated before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "evaluatedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were evaluated after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that were evaluated by the given user." + }, + { + "name": "rootDecisionInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have a given root decision instance id.\nThis also includes the decision instance with the given id." + }, + { + "name": "rootDecisionInstancesOnly", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances those are the root decision instance of an evaluation.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision requirements definition the instances belongs to." + }, + { + "name": "decisionRequirementsDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision requirements definition the instances belongs to." + }, + { + "name": "includeInputs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include input values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "includeOutputs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include output values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "disableBinaryFetching", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Disables fetching of byte array input and output values.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "disableCustomObjectDeserialization", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Disables deserialization of input and output values that are custom objects.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "evaluationTime", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricDecisionInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "request including inputs and outputs", + "description": "GET `/history/decision-instance?includeInputs\u003dtrue\u0026includeOutputs\u003dtrue`", + "value": [ + { + "activityId": "assignApprover", + "activityInstanceId": "assignApprover:67e9de1e-579d-11e5-9848-f0def1e59da8", + "collectResultValue": null, + "decisionDefinitionId": "invoice-assign-approver:1:4c864d79-579d-11e5-9848-f0def1e59da8", + "decisionDefinitionKey": "invoice-assign-approver", + "decisionDefinitionName": "Assign Approver", + "evaluationTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "id": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "inputs": [ + { + "clauseId": "clause1", + "clauseName": "Invoice Amount", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c41-579d-11e5-9848-f0def1e59da8", + "type": "Double", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": 123.0, + "valueInfo": {} + }, + { + "clauseId": "clause2", + "clauseName": "Invoice Category", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c40-579d-11e5-9848-f0def1e59da8", + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "Misc", + "valueInfo": {} + } + ], + "outputs": [ + { + "clauseId": "clause3", + "clauseName": "Approver Group", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c42-579d-11e5-9848-f0def1e59da8", + "ruleId": "DecisionRule_1of5a87", + "ruleOrder": 1, + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "accounting", + "valueInfo": {}, + "variableName": "result" + } + ], + "processDefinitionId": "invoice:1:4c6e3197-579d-11e5-9848-f0def1e59da8", + "processDefinitionKey": "invoice", + "processInstanceId": "67e98fec-579d-11e5-9848-f0def1e59da8", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "caseDefinitionId": null, + "caseDefinitionKey": null, + "caseInstanceId": null, + "tenantId": null, + "userId": null, + "rootDecisionInstanceId": null, + "decisionRequirementsDefinitionId": null, + "decisionRequirementsDefinitionKey": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/decision-instance/count": { + "get": { + "operationId": "getHistoricDecisionInstancesCount", + "tags": [ + "Historic Decision Instance" + ], + "summary": "Get Historic Decision Instance Count", + "description": "Queries for the number of historic decision instances that fulfill the given parameters. \nTakes the same parameters as the \n[Get Historic Decision Instances](https://docs.camunda.org/manual/7.22/reference/rest/history/decision-instance/get-decision-instance-query/) \nmethod.", + "parameters": [ + { + "name": "decisionInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision instance id." + }, + { + "name": "decisionInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision instance ids. Must be a comma-separated list of decision instance ids." + }, + { + "name": "decisionDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision definitions the instances belongs to. Must be a\ncomma-separated list of decision definition ids." + }, + { + "name": "decisionDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the keys of the decision definition the instances belongs to. Must be a comma-\nseparated list of decision definition keys." + }, + { + "name": "decisionDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition the instances belongs to, that the parameter\nis a substring of." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the instances belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances belongs to." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process instance the instances belongs to." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case definition the instances belongs to." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the case definition the instances belongs to." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case instance the instances belongs to." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity ids the instances belongs to.\nMust be a comma-separated list of acitvity ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity instance ids the instances belongs to.\nMust be a comma-separated list of acitvity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A historic decision instance must have one\nof the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic decision instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "evaluatedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were evaluated before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "evaluatedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were evaluated after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that were evaluated by the given user." + }, + { + "name": "rootDecisionInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have a given root decision instance id.\nThis also includes the decision instance with the given id." + }, + { + "name": "rootDecisionInstancesOnly", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances those are the root decision instance of an evaluation.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision requirements definition the instances belongs to." + }, + { + "name": "decisionRequirementsDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision requirements definition the instances belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/decision-instance/count`", + "value": { + "count": 4 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/decision-instance/delete": { + "post": { + "operationId": "deleteAsync", + "tags": [ + "Historic Decision Instance" + ], + "summary": "Delete Async (POST)", + "description": "Delete multiple historic decision instances asynchronously (batch).\nAt least `historicDecisionInstanceIds` or `historicDecisionInstanceQuery` \nhas to be provided. If both are provided then all instances matching query \ncriterion and instances from the list will be deleted.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteHistoricDecisionInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/decision-instance/delete`", + "description": "POST `/history/decision-instance/delete`", + "value": { + "historicDecisionInstanceIds": [ + "aDecision", + "secondDecision" + ], + "historicDecisionInstanceQuery": { + "decisionDefinitionKey": "a-definition-key" + }, + "deleteReason": "a delete reason" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/decision-instance/delete`", + "description": "POST `/history/decision-instance/delete`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspened": false, + "tenantId": null, + "createUserId": "aUser" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, i.e. neither\n`historicDecisionInstanceIds` nor `historicDecisionInstanceQuery` is\npresent. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) \nfor the error response format." + } + } + } + }, + "/history/decision-instance/set-removal-time": { + "post": { + "operationId": "setRemovalTimeAsyncHistoricDecisionInstance", + "tags": [ + "Historic Decision Instance" + ], + "summary": "Set Removal Time Async (POST)", + "description": "Sets the removal time to multiple historic decision instances asynchronously\n(batch).\n\nAt least `historicDecisionInstanceIds` or\n`historicDecisionInstanceQuery` has to be provided. If both are\nprovided, all instances matching query criterion and instances from the list\nwill be updated with a removal time.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetRemovalTimeToHistoricDecisionInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/decision-instance/set-removal-time`", + "description": "POST `/history/decision-instance/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "hierarchical": true, + "historicDecisionInstanceQuery": { + "evaluatedBefore": "2019-09-05T17:02:10.123+0200" + }, + "historicDecisionInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/decision-instance/set-removal-time`", + "description": "POST `/history/decision-instance/set-removal-time`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "decision-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "suspended": false, + "tenantId": "accounting", + "createUserId": "demo-user" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Request was unsuccessfull due to a bad user request. This occurs if\nsome of the query parameters are invalid, e. g. if neither\nhistoricDecisionInstances nor historicDecisionInstanceQuery is\npresent or if no mode is specified.\n\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/decision-instance/{id}": { + "get": { + "operationId": "getHistoricDecisionInstance", + "tags": [ + "Historic Decision Instance" + ], + "summary": "Get Historic Decision Instance", + "description": "Retrieves a historic decision instance by id, according to the \n`HistoricDecisionInstance` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic decision instance to be retrieved." + }, + { + "name": "includeInputs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include input values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "includeOutputs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include output values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "disableBinaryFetching", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Disables fetching of byte array input and output values.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "disableCustomObjectDeserialization", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Disables deserialization of input and output values that are custom objects.\nValue may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricDecisionInstanceDto" + }, + "examples": { + "example-1": { + "summary": "request including inputs and outputs", + "description": "GET `/history/decision-instance/aDecisionInstId?includeInput\u003dtrue\u0026includeOutputs\u003dtrue`", + "value": { + "activityId": "assignApprover", + "activityInstanceId": "assignApprover:67e9de1e-579d-11e5-9848-f0def1e59da8", + "collectResultValue": null, + "decisionDefinitionId": "invoice-assign-approver:1:4c864d79-579d-11e5-9848-f0def1e59da8", + "decisionDefinitionKey": "invoice-assign-approver", + "decisionDefinitionName": "Assign Approver", + "evaluationTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "id": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "inputs": [ + { + "clauseId": "clause1", + "clauseName": "Invoice Amount", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c41-579d-11e5-9848-f0def1e59da8", + "type": "Double", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": 123.0, + "valueInfo": {} + }, + { + "clauseId": "clause2", + "clauseName": "Invoice Category", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c40-579d-11e5-9848-f0def1e59da8", + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "Misc", + "valueInfo": {} + } + ], + "outputs": [ + { + "clauseId": "clause3", + "clauseName": "Approver Group", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c42-579d-11e5-9848-f0def1e59da8", + "ruleId": "DecisionRule_1of5a87", + "ruleOrder": 1, + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "accounting", + "valueInfo": {}, + "variableName": "result" + } + ], + "processDefinitionId": "invoice:1:4c6e3197-579d-11e5-9848-f0def1e59da8", + "processDefinitionKey": "invoice", + "processInstanceId": "67e98fec-579d-11e5-9848-f0def1e59da8", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "caseDefinitionId": null, + "caseDefinitionKey": null, + "caseInstanceId": null, + "tenantId": null, + "userId": null, + "rootDecisionInstanceId": null, + "decisionRequirementsDefinitionId": null, + "decisionRequirementsDefinitionKey": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic decision instance with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/decision-requirements-definition/{id}/statistics": { + "get": { + "operationId": "getDecisionStatistics", + "tags": [ + "Historic Decision Requirements Definition" + ], + "summary": "Get DRD Statistics", + "description": "Retrieves evaluation statistics of a given decision requirements definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision requirements definition." + }, + { + "name": "decisionInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query results to be based only on specific evaluation\ninstance of a given decision requirements definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricDecisionInstanceStatisticsDto" + } + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/history/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/statistics`", + "value": [ + { + "decisionDefinitionKey": "dish-decision", + "evaluations": 1 + } + ] + }, + "example-2": { + "summary": "request with decisionInstanceId", + "description": "GET `/history/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/statistics?decisionInstanceId\u003d17`", + "value": [ + { + "decisionDefinitionKey": "dish-decision", + "evaluations": 1 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/detail": { + "get": { + "operationId": "getHistoricDetails", + "tags": [ + "Historic Detail" + ], + "summary": "Get Historic Details", + "description": "Queries for historic details that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Historic Detail Count](https://docs.camunda.org/manual/7.22/reference/rest/history/detail/get-detail-query-count/) method.", + "parameters": [ + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic details which belong to one of the passed comma-separated process instance ids." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by execution id." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by task id." + }, + { + "name": "activityInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity instance id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case execution id." + }, + { + "name": "variableInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable instance id." + }, + { + "name": "variableTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic details where the variable updates belong to one of the passed comma-separated\nlist of variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type `serializable`." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable name like. Example usage: `variableNameLike(%camunda%)`. The query will match the names of variables in a case-insensitive way." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic details that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "userOperationId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a user operation id." + }, + { + "name": "formFields", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include `HistoricFormFields`. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "variableUpdates", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include `HistoricVariableUpdates`. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "excludeTaskDetails", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Excludes all task-related `HistoricDetails`, so only items which have no task id set will be selected.\nWhen this parameter is used together with `taskId`, this call is ignored and task details are not excluded.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "initial", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to historic variable updates that contain only initial variable values.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "occurredBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to historic details that occured before the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "occurredAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to historic details that occured after the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "processInstanceId", + "variableName", + "variableType", + "variableRevision", + "formPropertyId", + "time", + "occurrence", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricDetailDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail?processInstanceId\u003d3cd597b7-001a-11e7-8c6b-34f39ab71d4e`", + "description": "GET `/history/detail?processInstanceId\u003d3cd597b7-001a-11e7-8c6b-34f39ab71d4e`", + "value": [ + { + "type": "variableUpdate", + "id": "3cd79390-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "amount", + "variableInstanceId": "3cd65b08-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "Double", + "value": 30.0, + "valueInfo": {}, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + }, + { + "type": "variableUpdate", + "id": "3cd79392-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "invoiceDocument", + "variableInstanceId": "3cd65b0a-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "File", + "value": null, + "valueInfo": { + "mimeType": "application/pdf", + "filename": "invoice.pdf" + }, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricDetails", + "tags": [ + "Historic Detail" + ], + "summary": "Get Historic Details (POST)", + "description": "Queries for historic details that fulfill the given parameters. This method is slightly more\npowerful than the [Get Historic Details](https://docs.camunda.org/manual/7.22/reference/rest/history/detail/get-detail-query/)\nmethod because it allows sorting by multiple parameters. The size of the result set can be retrieved by\nusing the [Get Historic Detail Count](https://docs.camunda.org/manual/7.22/reference/rest/history/detail/get-detail-query-count/)\nmethod.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricDetailQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/detail?firstResult\u003d1\u0026maxResults\u003d10`", + "description": "POST `/history/detail?firstResult\u003d1\u0026maxResults\u003d10`", + "value": { + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "occurredAfter": "2018-01-29T10:15:45.000+0100", + "sorting": [ + { + "sortBy": "processInstanceId", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricDetailDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/history/detail?firstResult\u003d1\u0026maxResults\u003d10`", + "description": "POST `/history/detail?firstResult\u003d1\u0026maxResults\u003d10`", + "value": [ + { + "type": "variableUpdate", + "id": "3cd79390-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "amount", + "variableInstanceId": "3cd65b08-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "Double", + "value": 30.0, + "valueInfo": {}, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + }, + { + "type": "variableUpdate", + "id": "3cd79392-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "invoiceDocument", + "variableInstanceId": "3cd65b0a-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "File", + "value": null, + "valueInfo": { + "mimeType": "application/pdf", + "filename": "invoice.pdf" + }, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/detail/count": { + "get": { + "operationId": "getHistoricDetailsCount", + "tags": [ + "Historic Detail" + ], + "summary": "Get Historic Detail Count", + "description": "Queries for the number of historic details that fulfill the given parameters.\nTakes the same parameters as the [Get Historic\nDetails](https://docs.camunda.org/manual/7.22/reference/rest/history/detail/get-detail-query/)\nmethod.", + "parameters": [ + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic details which belong to one of the passed comma-separated process instance ids." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by execution id." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by task id." + }, + { + "name": "activityInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity instance id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case execution id." + }, + { + "name": "variableInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable instance id." + }, + { + "name": "variableTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic details where the variable updates belong to one of the passed comma-separated\nlist of variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type `serializable`." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable name like. Example usage: `variableNameLike(%camunda%)`. The query will match the names of variables in a case-insensitive way." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic details that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "userOperationId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a user operation id." + }, + { + "name": "formFields", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include `HistoricFormFields`. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "variableUpdates", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include `HistoricVariableUpdates`. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "excludeTaskDetails", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Excludes all task-related `HistoricDetails`, so only items which have no task id set will be selected.\nWhen this parameter is used together with `taskId`, this call is ignored and task details are not excluded.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "initial", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to historic variable updates that contain only initial variable values.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "occurredBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to historic details that occured before the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "occurredAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to historic details that occured after the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail/count?variableName\u003dmy_variable`", + "description": "GET `/history/detail/count?variableName\u003dmy_variable`", + "value": { + "count": 3 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid." + } + } + } + }, + "/history/detail/{id}": { + "get": { + "operationId": "historicDetail", + "tags": [ + "Historic Detail" + ], + "summary": "Get Historic Detail", + "description": "Retrieves a historic detail by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the detail." + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically\nvariables that store custom Java objects) should be deserialized\non server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on\nserver side and transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean\nproperty introspection feature. Note that this requires the Java\nclasses of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its\nserialized format. For example, a variable that is serialized as\nXML will be returned as a JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of\nbackward compatibility, we recommend setting this parameter to\n`false` when developing web applications that are independent of\nthe Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricDetailDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail/3cd79390-001a-11e7-8c6b-34f39ab71d4e`", + "description": "GET `/history/detail/3cd79390-001a-11e7-8c6b-34f39ab71d4e`", + "value": { + "type": "variableUpdate", + "id": "3cd79390-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "amount", + "variableInstanceId": "3cd65b08-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "Double", + "value": 30.0, + "valueInfo": {}, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/detail/{id}/data": { + "get": { + "operationId": "historicDetailBinary", + "tags": [ + "Historic Detail" + ], + "summary": "Get Historic Detail (Binary)", + "description": "Retrieves the content of a historic variable update by id. Applicable for byte\narray and file variables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic variable update." + } + ], + "responses": { + "200": { + "description": "Request successful.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail/someId/data`", + "value": "binary variable: Status 200. Content-Type: application/octet-stream" + } + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type. Additionally,\n for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail/someId/data`", + "value": "file variable: Status 200. Content-Type: text/plain; charset\u003dUTF-8.\n Content-Disposition: attachment; filename\u003d\u0027someFile.txt\u0027" + } + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Detail with given id exists but is not a binary variable. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Detail with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/external-task-log": { + "get": { + "operationId": "getHistoricExternalTaskLogs", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Logs", + "description": "Queries for historic external task logs that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get External Task Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/external-task-log/get-external-task-log-query-count/)\nmethod.", + "parameters": [ + { + "name": "logId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by historic external task log id." + }, + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by external task id." + }, + { + "name": "topicName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task topic." + }, + { + "name": "workerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + { + "name": "errorMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by external task exception message." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity\ninstance ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed execution ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task log entries which belong to one of the passed and\ncomma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic external task log entries that belong to no tenant. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated external task had a priority lower than or\nequal to the given value. Value must be a valid `long` value." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated external task had a priority higher than or\nequal to the given value. Value must be a valid `long` value." + }, + { + "name": "creationLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "failureLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "successLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "deletionLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "timestamp", + "externalTaskId", + "topicName", + "workerId", + "retries", + "priority", + "activityId", + "activityInstanceId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricExternalTaskLogDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/external-task-log?externalTaskId\u003danExternalTaskId`", + "description": "GET `/history/external-task-log?externalTaskId\u003danExternalTaskId`", + "value": [ + { + "id": "someId", + "timestamp": "2017-01-15T15:22:20.000+0200", + "externalTaskId": "anExternalTaskId", + "topicName": "aTopicName", + "workerId": "aWorkerId", + "retries": 3, + "priority": 5, + "errorMessage": "An error occured!", + "activityId": "externalServiceTask", + "activityInstanceId": "externalServiceTask:15", + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "tenantId": null, + "creationLog": false, + "failureLog": true, + "successLog": false, + "deletionLog": false, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricExternalTaskLogs", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Logs (POST)", + "description": "Queries for historic external task logs that fulfill the given parameters.\nThis method is slightly more powerful than the\n[Get External Task Logs](https://docs.camunda.org/manual/7.22/reference/rest/history/external-task-log/get-external-task-log-query/)\nmethod because it allows filtering by historic external task logs\nvalues of the different types `String`, `Number` or `Boolean`.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricExternalTaskLogQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/external-task-log`", + "value": { + "externalTaskId": "anExternalTaskId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricExternalTaskLogDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/history/external-task-log`", + "description": "POST `/history/external-task-log`", + "value": [ + { + "id": "someId", + "timestamp": "2017-01-15T15:22:20.000+0200", + "externalTaskId": "anExternalTaskId", + "topicName": "aTopicName", + "workerId": "aWorkerId", + "retries": 3, + "priority": 5, + "errorMessage": "An error occured!", + "activityId": "externalServiceTask", + "activityInstanceId": "externalServiceTask:15", + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "tenantId": null, + "creationLog": false, + "failureLog": true, + "successLog": false, + "deletionLog": false, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/external-task-log/count": { + "get": { + "operationId": "getHistoricExternalTaskLogsCount", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Log Count", + "description": "Queries for the number of historic external task logs that fulfill the given\nparameters.\nTakes the same parameters as the\n[Get External Task Logs](https://docs.camunda.org/manual/7.22/reference/rest/history/external-task-log/get-external-task-log-query/)\nmethod.", + "parameters": [ + { + "name": "logId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by historic external task log id." + }, + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by external task id." + }, + { + "name": "topicName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task topic." + }, + { + "name": "workerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + { + "name": "errorMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by external task exception message." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity\ninstance ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed execution ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task log entries which belong to one of the passed and\ncomma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic external task log entries that belong to no tenant. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated external task had a priority lower than or\nequal to the given value. Value must be a valid `long` value." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated external task had a priority higher than or\nequal to the given value. Value must be a valid `long` value." + }, + { + "name": "creationLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "failureLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "successLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "deletionLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/external-task-log/count?externalTaskId\u003danExternalTaskId`", + "description": "GET `/history/external-task-log/count?externalTaskId\u003danExternalTaskId`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid." + } + } + }, + "post": { + "operationId": "queryHistoricExternalTaskLogsCount", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Log Count (POST)", + "description": "Queries for the number of historic external task logs that fulfill the given\nparameters.\nThis method takes the same message body as the\n[Get External Task Logs (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/external-task-log/post-external-task-log-query/)\nmethod and therefore it is slightly more powerful than the\n[Get External Task Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/external-task-log/get-external-task-log-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricExternalTaskLogQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/external-task-log/count`", + "value": { + "externalTaskId": "anExternalTaskId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/external-task-log/count`", + "description": "POST `/history/external-task-log/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/external-task-log/{id}": { + "get": { + "operationId": "getHistoricExternalTaskLog", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Log", + "description": "Retrieves a historic external task log by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the log entry." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricExternalTaskLogDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/external-task-log/someId`", + "value": { + "id": "someId", + "timestamp": "2017-01-15T15:22:20.000+0200", + "externalTaskId": "anExternalTaskId", + "topicName": "aTopicName", + "workerId": "aWorkerId", + "retries": 3, + "priority": 5, + "errorMessage": "An error occured!", + "activityId": "externalServiceTask", + "activityInstanceId": "externalServiceTask:15", + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "tenantId": null, + "creationLog": false, + "failureLog": true, + "successLog": false, + "deletionLog": false, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic external task log with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/external-task-log/{id}/error-details": { + "get": { + "operationId": "getErrorDetailsHistoricExternalTaskLog", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Log Error Details", + "description": "Retrieves the corresponding error details of the passed historic external task log\nby id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic external task log to get the error details for." + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": {}, + "examples": { + "example-1": { + "summary": "GET `history/external-task-log/someId/error-details`", + "description": "GET `history/external-task-log/someId/error-details`", + "value": "java.lang.RuntimeException: A exception message!\n at org.camunda.bpm.pa.service.FailingDelegate.execute(FailingDelegate.java:10)\n at org.camunda.bpm.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34)\n at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)\n ..." + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic external task log with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/identity-link-log": { + "get": { + "operationId": "getHistoricIdentityLinks", + "tags": [ + "Historic Identity Link Log" + ], + "summary": "Get Identity Link Logs", + "description": "Queries for historic identity link logs that fulfill given parameters.\nThe size of the result set can be retrieved by using the\n[Get Identity-Link-Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/identity-links/get-identity-link-query-count/)\nmethod.", + "parameters": [ + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given type (candidate/assignee/owner)." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given user id." + }, + { + "name": "groupId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given group id." + }, + { + "name": "dateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to identity links that have the time before the given time." + }, + { + "name": "dateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to identity links that have the time after the given time." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given task id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given process definition key." + }, + { + "name": "operationType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given operationType (add/delete)." + }, + { + "name": "assignerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given assigner id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic identity links that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "time", + "type", + "userId", + "groupId", + "taskId", + "processDefinitionId", + "processDefinitionKey", + "operationType", + "assignerId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricIdentityLinkLogDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/identity-link-log?taskId\u003daTaskId`", + "description": "GET `/history/identity-link-log?taskId\u003daTaskId`", + "value": [ + { + "id": "1", + "time": "2014-03-01T08:00:00.000+0200", + "type": "candidate", + "userId": "aUserId", + "groupId": "aGroupId", + "taskId": "aTaskId", + "processDefinitionId": "12", + "operationType": "add", + "assignerId": "aAssignerId", + "processDefinitionKey": "oneTaskProcess", + "tenantId": "tenant1", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "2", + "time": "2014-03-05T10:00:00.000+0200", + "type": "candidate", + "userId": "aUserId", + "groupId": "aGroupId", + "taskId": "aTaskId", + "processDefinitionId": "12", + "operationType": "delete", + "assignerId": "aAssignerId", + "processDefinitionKey": "oneTaskProcess", + "tenantId": "tenant1", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/identity-link-log/count": { + "get": { + "operationId": "getHistoricIdentityLinksCount", + "tags": [ + "Historic Identity Link Log" + ], + "summary": "Get Identity Link Log Count", + "description": "Queries for the number of historic identity link logs that fulfill the given\nparameters. Takes the same parameters as the\n[Get Identity-Link-Logs](https://docs.camunda.org/manual/7.22/reference/rest/history/identity-links/get-identity-link-query/)\nmethod.", + "parameters": [ + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given type (candidate/assignee/owner)." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given user id." + }, + { + "name": "groupId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given group id." + }, + { + "name": "dateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to identity links that have the time before the given time." + }, + { + "name": "dateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to identity links that have the time after the given time." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given task id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given process definition key." + }, + { + "name": "operationType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given operationType (add/delete)." + }, + { + "name": "assignerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given assigner id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic identity links that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/identity-link-log/count?taskId\u003daTaskId`", + "description": "GET `/history/identity-link-log/count?taskId\u003daTaskId`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/incident": { + "get": { + "operationId": "getHistoricIncidents", + "tags": [ + "Historic Incident" + ], + "summary": "Get Incidents", + "description": "Queries for historic incidents that fulfill given parameters.\nThe size of the result set can be retrieved by using the\n[Get Incident Count](https://docs.camunda.org/manual/7.22/reference/rest/history/incident/get-incident-query-count/)\nmethod.", + "parameters": [ + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to the given incident type. See the [User\nGuide](/manual/develop/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident message." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that incidents message is a substring of the given value.\nThe string can include the wildcard character \u0027%\u0027 to express\nlike-strategy: starts with (string%), ends with (%string) or contains\n(%string%).\n" + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given processDefinitionKey." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given process definition keys." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process instance with the given id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an execution with the given id." + }, + { + "name": "createTimeBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have a createTime date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "createTimeAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have a createTime date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "endTimeBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an endTimeBefore date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "endTimeAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an endTimeAfter date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an activity with the given id." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that were created due to the failure of an activity with the given\nid." + }, + { + "name": "causeIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as cause incident." + }, + { + "name": "rootCauseIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as root cause incident." + }, + { + "name": "configuration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as configuration." + }, + { + "name": "historyConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as history configuration." + }, + { + "name": "open", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are open." + }, + { + "name": "resolved", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are resolved." + }, + { + "name": "deleted", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are deleted." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic incidents that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "jobDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated job definition ids." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "incidentId", + "incidentMessage", + "createTime", + "endTime", + "incidentType", + "executionId", + "activityId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "causeIncidentId", + "rootCauseIncidentId", + "configuration", + "historyConfiguration", + "tenantId", + "incidentState" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricIncidentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/incident?processInstanceId\u003daProcInstId`", + "description": "GET `/history/incident?processInstanceId\u003daProcInstId`", + "value": [ + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "createTime": "2014-03-01T08:00:00.000+0200", + "endTime": null, + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "incidentMessage": "anIncidentMessage", + "tenantId": null, + "jobDefinitionId": "aJobDefinitionId", + "open": true, + "deleted": false, + "resolved": false, + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "annotation": "an annotation" + }, + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anotherExecutionId", + "createTime": "2014-03-01T08:00:00.000+0200", + "endTime": "2014-03-10T12:00:00.000+0200", + "incidentType": "customIncidentType", + "activityId": "userTask", + "failedActivityId": "userTask", + "causeIncidentId": "anotherCauseIncidentId", + "rootCauseIncidentId": "anotherRootCauseIncidentId", + "configuration": "anotherConfiguration", + "incidentMessage": "anotherIncidentMessage", + "tenantId": null, + "jobDefinitionId": null, + "open": false, + "deleted": false, + "resolved": true, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "annotation": "another annotation" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/incident/count": { + "get": { + "operationId": "getHistoricIncidentsCount", + "tags": [ + "Historic Incident" + ], + "summary": "Get Incident Count", + "description": "Queries for the number of historic incidents that fulfill the given parameters.\nTakes the same parameters as the\n[Get Incidents](https://docs.camunda.org/manual/7.22/reference/rest/history/incident/get-incident-query/)\nmethod.", + "parameters": [ + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to the given incident type. See the [User\nGuide](/manual/develop/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident message." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that incidents message is a substring of the given value.\nThe string can include the wildcard character \u0027%\u0027 to express\nlike-strategy: starts with (string%), ends with (%string) or contains\n(%string%).\n" + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given processDefinitionKey." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given process definition keys." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process instance with the given id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an execution with the given id." + }, + { + "name": "createTimeBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have a createTime date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "createTimeAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have a createTime date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "endTimeBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an endTimeBefore date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "endTimeAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an endTimeAfter date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an activity with the given id." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that were created due to the failure of an activity with the given\nid." + }, + { + "name": "causeIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as cause incident." + }, + { + "name": "rootCauseIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as root cause incident." + }, + { + "name": "configuration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as configuration." + }, + { + "name": "historyConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as history configuration." + }, + { + "name": "open", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are open." + }, + { + "name": "resolved", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are resolved." + }, + { + "name": "deleted", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are deleted." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic incidents that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "jobDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated job definition ids." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/incident/count?processInstanceId\u003daProcInstId`", + "description": "GET `/history/incident/count?processInstanceId\u003daProcInstId`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/job-log": { + "get": { + "operationId": "getHistoricJobLogs", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Logs", + "description": "Queries for historic job logs that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Job Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/job-log/get-job-log-query-count/)\nmethod.", + "parameters": [ + { + "name": "logId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by historic job log id." + }, + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobExceptionMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job exception message." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "jobDefinitionType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job definition types." + }, + { + "name": "jobDefinitionConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition configuration." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed activity ids." + }, + { + "name": "failedActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to failures of one of the passed activity ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed execution ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job log entries which belong to one of the passed and comma-\nseparated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic job log entries that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "hostname", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by hostname." + }, + { + "name": "jobPriorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated job had a priority lower than or equal to the\ngiven value. Value must be a valid `long` value." + }, + { + "name": "jobPriorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated job had a priority higher than or equal to the\ngiven value. Value must be a valid `long` value." + }, + { + "name": "creationLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "failureLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "successLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "deletionLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "timestamp", + "jobId", + "jobDefinitionId", + "jobDueDate", + "jobRetries", + "jobPriority", + "activityId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "deploymentId", + "hostname", + "occurrence", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricJobLogDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/job-log?jobId\u003daJobId`", + "description": "GET `/history/job-log?jobId\u003daJobId`", + "value": [ + { + "id": "someId", + "timestamp": "2015-01-15T15:22:20.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "jobId": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "activityId": "serviceTask", + "jobType": "message", + "jobHandlerType": "async-continuation", + "jobDueDate": null, + "jobRetries": 3, + "jobPriority": 15, + "jobExceptionMessage": null, + "failedActivityId": null, + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "deploymentId": "aDeploymentId", + "rootProcessInstanceId": "aRootProcessInstanceId", + "tenantId": null, + "hostname": "aHostname", + "batchId": "aBatchId", + "creationLog": true, + "failureLog": false, + "successLog": false, + "deletionLog": false + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricJobLogs", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Logs (POST)", + "description": "Queries for historic job logs that fulfill the given parameters.\nThis method is slightly more powerful than the\n[Get Job Logs](https://docs.camunda.org/manual/7.22/reference/rest/history/job-log/get-job-log-query/)\nmethod because it allows filtering by historic job logs values of the\ndifferent types `String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricJobLogQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/job-log`", + "value": { + "jobId": "aJobId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricJobLogDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/history/job-log`", + "description": "POST `/history/job-log`", + "value": [ + { + "id": "someId", + "timestamp": "2015-01-15T15:22:20.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "jobId": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "activityId": "serviceTask", + "jobType": "message", + "jobHandlerType": "async-continuation", + "jobDueDate": null, + "jobRetries": 3, + "jobPriority": 15, + "jobExceptionMessage": null, + "failedActivityId": null, + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "deploymentId": "aDeploymentId", + "rootProcessInstanceId": "aRootProcessInstanceId", + "tenantId": null, + "hostname": "aHostname", + "batchId": "aBatchId", + "creationLog": true, + "failureLog": false, + "successLog": false, + "deletionLog": false + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/job-log/count": { + "get": { + "operationId": "getHistoricJobLogsCount", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Log Count", + "description": "Queries for the number of historic job logs that fulfill the given parameters.\nTakes the same parameters as the\n[Get Job Logs](https://docs.camunda.org/manual/7.22/reference/rest/history/job-log/get-job-log-query/)\nmethod.", + "parameters": [ + { + "name": "logId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by historic job log id." + }, + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobExceptionMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job exception message." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "jobDefinitionType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job definition types." + }, + { + "name": "jobDefinitionConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition configuration." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed activity ids." + }, + { + "name": "failedActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to failures of one of the passed activity ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed execution ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job log entries which belong to one of the passed and comma-\nseparated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic job log entries that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "hostname", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by hostname." + }, + { + "name": "jobPriorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated job had a priority lower than or equal to the\ngiven value. Value must be a valid `long` value." + }, + { + "name": "jobPriorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated job had a priority higher than or equal to the\ngiven value. Value must be a valid `long` value." + }, + { + "name": "creationLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "failureLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "successLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "deletionLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/job-log/count?jobId\u003daJobId`", + "description": "GET `/history/job-log/count?jobId\u003daJobId`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid." + } + } + }, + "post": { + "operationId": "queryHistoricJobLogsCount", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Log Count (POST)", + "description": "Queries for the number of historic job logs that fulfill the given parameters.\nThis method takes the same message body as the\n[Get Job Logs (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/job-log/post-job-log-query/)\nmethod and therefore it is slightly more powerful than the\n[Get Job Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/job-log/get-job-log-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricJobLogQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/job-log/count`", + "value": { + "jobId": "aJobId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/job-log/count`", + "description": "POST `/history/job-log/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/job-log/{id}": { + "get": { + "operationId": "getHistoricJobLog", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Log", + "description": "Retrieves a historic job log by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the log entry." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricJobLogDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/job-log/someId`", + "value": { + "id": "someId", + "timestamp": "2015-01-15T15:22:20.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "jobId": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "activityId": "serviceTask", + "jobType": "message", + "jobHandlerType": "async-continuation", + "jobDueDate": null, + "jobRetries": 3, + "jobPriority": 15, + "jobExceptionMessage": null, + "failedActivityId": null, + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "deploymentId": "aDeploymentId", + "rootProcessInstanceId": "aRootProcessInstanceId", + "tenantId": null, + "hostname": "aHostname", + "batchId": "aBatchId", + "creationLog": true, + "failureLog": false, + "successLog": false, + "deletionLog": false + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic job log with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/job-log/{id}/stacktrace": { + "get": { + "operationId": "getStacktraceHistoricJobLog", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Log Exception Stacktrace", + "description": "Retrieves the corresponding exception stacktrace to the passed historic job log by\nid.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic job log to get the exception stacktrace for." + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": {}, + "examples": { + "example-1": { + "summary": "response", + "description": "GET `history/job-log/someId/stacktrace`\n\n The result is the corresponding stacktrace as plain text.", + "value": "java.lang.RuntimeException: A exception message!\n at org.camunda.bpm.pa.service.FailingDelegate.execute(FailingDelegate.java:10)\n at org.camunda.bpm.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34)\n at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)\n ..." + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic job log with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/process-definition/cleanable-process-instance-report": { + "get": { + "operationId": "getCleanableHistoricProcessInstanceReport", + "tags": [ + "Historic Process Definition" + ], + "summary": "Get Cleanable Process Instance Report", + "description": "Retrieves a report about a process definition and finished process instances\nrelevant to history cleanup (see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)) \nso that you can tune the history time to live.\nThese reports include the count of the finished historic process\ninstances, cleanable process instances and basic process definition\ndata - id, key, name and version.\nThe size of the result set can be retrieved by using the\n[Get Cleanable Process Instance Report Count](https://docs.camunda.org/manual/7.22/reference/rest/history/process-definition/get-cleanable-process-instance-report-count/)\nmethod.", + "parameters": [ + { + "name": "processDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition ids. Must be a comma-separated list of process definition ids." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition keys. Must be a comma-separated list of process definition keys." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A process definition must have one of the given \ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions which belong to no tenant. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "compact", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have more than zero finished instances. Value may\nonly be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "finished" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CleanableHistoricProcessInstanceReportResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/process-definition/cleanable-process-instance-report`", + "description": "GET `/history/process-definition/cleanable-process-instance-report`", + "value": [ + { + "processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt", + "processDefinitionVersion": 1, + "historyTimeToLive": 5, + "finishedProcessInstanceCount": 100, + "cleanableProcessInstanceCount": 53, + "tenantId": "aTenantId" + }, + { + "processDefinitionId": "invoice:2:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt v2.0", + "processDefinitionVersion": 2, + "historyTimeToLive": 5, + "finishedProcessInstanceCount": 1000, + "cleanableProcessInstanceCount": 13, + "tenantId": "aTenantId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/process-definition/cleanable-process-instance-report/count": { + "get": { + "operationId": "getCleanableHistoricProcessInstanceReportCount", + "tags": [ + "Historic Process Definition" + ], + "summary": "Get Cleanable Process Instance Report Count", + "description": "Queries for the number of report results about a process definition and finished\nprocess instances relevant to history cleanup (see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).\nTakes the same parameters as the\n[Get Cleanable Process Instance Report](https://docs.camunda.org/manual/7.22/reference/rest/history/process-definition/get-cleanable-process-instance-report/)\nmethod.", + "parameters": [ + { + "name": "processDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition ids. Must be a comma-separated list of process definition ids." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition keys. Must be a comma-separated list of process definition keys." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A process definition must have one of the given \ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions which belong to no tenant. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "compact", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have more than zero finished instances. Value may\nonly be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/process-definition/cleanable-process-instance-report/count`", + "description": "GET `/history/process-definition/cleanable-process-instance-report/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/process-definition/{id}/statistics": { + "get": { + "operationId": "getHistoricActivityStatistics", + "tags": [ + "Historic Process Definition" + ], + "summary": "Get Historic Activity Statistics", + "description": "Retrieves historic statistics of a given process definition, grouped by activities.\nThese statistics include the number of running activity instances and,\noptionally, the number of canceled activity instances, finished\nactivity instances and activity instances which completed a scope\n(i.e., in BPMN 2.0 manner: a scope is completed by an activity\ninstance when the activity instance consumed a token but did not emit\na new token).\n**Note:** This only includes historic data.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + }, + { + "name": "canceled", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of canceled activity instances in the result or not. Valid\nvalues are `true` or `false`. Default: `false`." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of finished activity instances in the result or not. Valid\nvalues are `true` or `false`. Default: `false`." + }, + { + "name": "completeScope", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of activity instances which completed a scope in the result\nor not. Valid values are `true` or `false`. Default: `false`." + }, + { + "name": "incidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of incidents. Valid values are `true` or `false`. Default: `false`." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to process instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), \nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, \ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to process instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), \nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, \ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to process instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), \nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, \ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to process instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), \nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, \ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to process instances with the given IDs. The IDs must be provided as a comma-\nseparated list." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "activityId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricActivityStatisticsDto" + } + }, + "examples": { + "example-1": { + "summary": "Request With `canceled\u003dtrue`", + "description": "GET `history/process-definition/aProcessDefinitionId/statistics?canceled\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "canceled": 50, + "finished": 0, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + }, + { + "id": "anotherActivity", + "instances": 200, + "canceled": 150, + "finished": 0, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + } + ] + }, + "example-2": { + "summary": "Request With `finished\u003dtrue`", + "description": "GET `history/process-definition/aProcessDefinitionId/statistics?finished\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "canceled": 0, + "finished": 20, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + }, + { + "id": "anotherActivity", + "instances": 200, + "canceled": 0, + "finished": 30, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + } + ] + }, + "example-3": { + "summary": "Request With `completeScope\u003dtrue`", + "description": "GET `history/process-definition/aProcessDefinitionId/statistics?completeScope\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "canceled": 0, + "finished": 0, + "completeScope": 20, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + }, + { + "id": "anotherActivity", + "instances": 200, + "canceled": 0, + "finished": 0, + "completeScope": 1, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/process-instance": { + "get": { + "operationId": "getHistoricProcessInstances", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get List", + "description": "Queries for historic process instances that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Process Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/process-instance/get-process-instance-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "instanceId", + "definitionId", + "definitionKey", + "definitionName", + "definitionVersion", + "businessKey", + "startTime", + "endTime", + "duration", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance ids. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the instances run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances run on." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the process definition the instances run on." + }, + { + "name": "processDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition names that the parameter is a substring of." + }, + { + "name": "processDefinitionKeyNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Exclude instances that belong to a set of process definitions. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of business keys. A process instance must have one of the given business keys. Filter by a comma-separated list of `Strings`" + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + { + "name": "rootProcessInstances", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are top level process instances." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished process instances. This flag includes all process instances\nthat are completed or terminated. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished process instances. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "withIncidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have an incident. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "withRootIncidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have a root incident. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "incidentIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have an incident with one of the given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type. See the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + { + "name": "incidentStatus", + "in": "query", + "schema": { + "enum": [ + "open", + "resolved" + ], + "type": "string" + }, + "description": "Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedActivityAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an activity after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedActivityBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an activity before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedJobAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an job after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedJobBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an job before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that were started by the given user." + }, + { + "name": "superProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id." + }, + { + "name": "subProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to one process instance that has a sub process instance with the given id." + }, + { + "name": "superCaseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + { + "name": "subCaseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to one process instance that has a sub case instance with the given id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic process instances which belong to no tenant. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances with an active activity with one of the given ids. This filter behaves differently as `activeActivityIdIn` since it also yields results when filtering for activities with an incident. Filter by a comma-separated list of `Strings`" + }, + { + "name": "executedActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that executed an activity with one of given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "activeActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have an active activity with one of given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are active." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are suspended." + }, + { + "name": "completed", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are completed." + }, + { + "name": "externallyTerminated", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are externallyTerminated." + }, + { + "name": "internallyTerminated", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are internallyTerminated." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that have/had variables with certain values.\nVariable filtering expressions are comma-separated and are structured as follows:\nA valid parameter value has the form `key_operator_value`. `key` is the variable name, `operator` is the comparison operator to be used and `value` the variable value.\n\n**Note:** Values are always treated as String objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`.\n\nKey and value may not contain underscore or comma characters.\n" + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in variables case-insensitively. If set to `true` variableName and variablename are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in variables case-insensitively. If set to `true` variableValue and variablevalue are treated as equal." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricProcessInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/process-instance?finishedAfter\u003d2013-01-01T00:00:00.000%2b0200\u0026finishedBefore\u003d2013-04-01T23:59:59.000%2b0200\u0026executedActivityAfter\u003d2013-03-23T13:42:44.000%2b0200`", + "value": [ + { + "id": "7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e", + "businessKey": null, + "processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt", + "processDefinitionVersion": 1, + "startTime": "2017-02-10T14:33:19.000+0200", + "endTime": null, + "removalTime": null, + "durationInMillis": null, + "startUserId": null, + "startActivityId": "StartEvent_1", + "deleteReason": null, + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "superProcessInstanceId": null, + "superCaseInstanceId": null, + "caseInstanceId": null, + "tenantId": null, + "state": "ACTIVE", + "restartedProcessInstanceId": "2bef365d-3406-11ef-bd73-0a0027000003" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricProcessInstances", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get List (POST)", + "description": "Queries for historic process instances that fulfill the given parameters.\nThis method is slightly more powerful than the\n[Get Process Instance](https://docs.camunda.org/manual/7.22/reference/rest/history/process-instance/get-process-instance-query/)\nbecause it allows filtering by multiple process variables of types `String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/process-instance`", + "value": { + "finishedAfter": "2013-01-01T00:00:00.000+0200", + "finishedBefore": "2013-04-01T23:59:59.000+0200", + "executedActivityAfter": "2013-03-23T13:42:44.000+0200", + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "sorting": [ + { + "sortBy": "businessKey", + "sortOrder": "asc" + }, + { + "sortBy": "startTime", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricProcessInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/history/process-instance`", + "value": [ + { + "id": "7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e", + "businessKey": null, + "processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt", + "processDefinitionVersion": 1, + "startTime": "2017-02-10T14:33:19.000+0200", + "endTime": null, + "removalTime": null, + "durationInMillis": null, + "startUserId": null, + "startActivityId": "StartEvent_1", + "deleteReason": null, + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "superProcessInstanceId": null, + "superCaseInstanceId": null, + "caseInstanceId": null, + "tenantId": null, + "state": "ACTIVE", + "restartedProcessInstanceId": "2bef365d-3406-11ef-bd73-0a0027000003" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/process-instance/count": { + "get": { + "operationId": "getHistoricProcessInstancesCount", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get List Count", + "description": "Queries for the number of historic process instances that fulfill the given parameters.\nTakes the same parameters as the [Get Process Instances](https://docs.camunda.org/manual/7.22/reference/rest/history/process-instance/get-process-instance-query/) method.", + "parameters": [ + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance ids. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the instances run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances run on." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the process definition the instances run on." + }, + { + "name": "processDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition names that the parameter is a substring of." + }, + { + "name": "processDefinitionKeyNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Exclude instances that belong to a set of process definitions. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of business keys. A process instance must have one of the given business keys. Filter by a comma-separated list of `Strings`" + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + { + "name": "rootProcessInstances", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are top level process instances." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished process instances. This flag includes all process instances\nthat are completed or terminated. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished process instances. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "withIncidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have an incident. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "withRootIncidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have a root incident. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "incidentIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have an incident with one of the given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type. See the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + { + "name": "incidentStatus", + "in": "query", + "schema": { + "enum": [ + "open", + "resolved" + ], + "type": "string" + }, + "description": "Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedActivityAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an activity after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedActivityBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an activity before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedJobAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an job after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedJobBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an job before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that were started by the given user." + }, + { + "name": "superProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id." + }, + { + "name": "subProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to one process instance that has a sub process instance with the given id." + }, + { + "name": "superCaseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + { + "name": "subCaseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to one process instance that has a sub case instance with the given id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic process instances which belong to no tenant. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances with an active activity with one of the given ids. This filter behaves differently as `activeActivityIdIn` since it also yields results when filtering for activities with an incident. Filter by a comma-separated list of `Strings`" + }, + { + "name": "executedActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that executed an activity with one of given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "activeActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have an active activity with one of given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are active." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are suspended." + }, + { + "name": "completed", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are completed." + }, + { + "name": "externallyTerminated", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are externallyTerminated." + }, + { + "name": "internallyTerminated", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are internallyTerminated." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that have/had variables with certain values.\nVariable filtering expressions are comma-separated and are structured as follows:\nA valid parameter value has the form `key_operator_value`. `key` is the variable name, `operator` is the comparison operator to be used and `value` the variable value.\n\n**Note:** Values are always treated as String objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`.\n\nKey and value may not contain underscore or comma characters.\n" + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in variables case-insensitively. If set to `true` variableName and variablename are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in variables case-insensitively. If set to `true` variableValue and variablevalue are treated as equal." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/process-instance/count?variables\u003dmyVariable_eq_camunda`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricProcessInstancesCount", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get List Count (POST)", + "description": "Queries for the number of historic process instances that fulfill the given parameters.\nThis method takes the same message body as the [Get Process Instances (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/process-instance/get-process-instance-query/) method and\ntherefore it is slightly more powerful than the [Get Process Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/process-instance/post-process-instance-query-count/) method.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/process-instance/count`", + "value": { + "finishedAfter": "2013-01-01T00:00:00.000+0200", + "finishedBefore": "2013-04-01T23:59:59.000+0200", + "executedActivityAfter": "2013-03-23T13:42:44.000+0200", + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/process-instance/delete": { + "post": { + "operationId": "deleteHistoricProcessInstancesAsync", + "tags": [ + "Historic Process Instance" + ], + "summary": "Delete Async (POST)", + "description": "Delete multiple historic process instances asynchronously (batch).\nAt least `historicProcessInstanceIds` or `historicProcessInstanceQuery` has to be provided.\nIf both are provided then all instances matching query criterion and instances from the list will be deleted.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteHistoricProcessInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/process-instance/delete`", + "value": { + "deleteReason": "aReason", + "historicProcessInstanceIds": [ + "aProcess", + "secondProcess" + ], + "historicProcessInstanceQuery": { + "startedAfter": "2016-10-11T11:44:13.000+0200", + "finishedBefore": "2016-10-13T11:44:17.000+0200" + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/history/process-instance/delete`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "process-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, i.e. neither historicProcessInstanceIds,\nnor historicProcessInstanceQuery is present. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/process-instance/report": { + "get": { + "operationId": "getHistoricProcessInstanceDurationReport", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get Duration Report", + "description": "Retrieves a report about the duration of completed process instances, grouped by a period.\nThese reports include the maximum, minimum and average duration of all completed process instances which were started in a given period.\n\n**Note:** This only includes historic data.", + "parameters": [ + { + "name": "reportType", + "in": "query", + "schema": { + "type": "string" + }, + "required": true, + "description": "**Mandatory.** Specifies the type of the report to retrieve.\nTo retrieve a report about the duration of process instances, the value must be set to `duration`." + }, + { + "name": "periodUnit", + "in": "query", + "schema": { + "enum": [ + "month", + "quarter" + ], + "type": "string" + }, + "required": true, + "description": "**Mandatory.** Specifies the granularity of the report. Valid values are `month` and `quarter`." + }, + { + "name": "processDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition ids. Must be a comma-separated list of process definition ids." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition keys. Must be a comma-separated list of process definition keys." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started before the given date.\nBy [default](), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2016-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2016-01-23T14:42:45.000+0200`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DurationReportResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/process-instance/report?reportType\u003dduration\u0026periodUnit\u003dquarter\u0026processDefinitionKeyIn\u003dinvoice`", + "value": [ + { + "period": 1, + "periodUnit": "QUARTER", + "maximum": 500000, + "minimum": 250000, + "average": 375000 + }, + { + "period": 2, + "periodUnit": "QUARTER", + "maximum": 600000, + "minimum": 300000, + "average": 450000 + }, + { + "period": 3, + "periodUnit": "QUARTER", + "maximum": 1000000, + "minimum": 500000, + "average": 750000 + }, + { + "period": 4, + "periodUnit": "QUARTER", + "maximum": 200000, + "minimum": 100000, + "average": 150000 + } + ] + } + } + }, + "application/csv": { + "schema": {} + }, + "text/csv": { + "schema": {} + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid or mandatory parameters are not supplied.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the authenticated user is unauthorized to read the history.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/process-instance/set-removal-time": { + "post": { + "operationId": "setRemovalTimeAsync", + "tags": [ + "Historic Process Instance" + ], + "summary": "Set Removal Time Async (POST)", + "description": "Sets the removal time to multiple historic process instances asynchronously (batch).\n\nAt least `historicProcessInstanceIds` or `historicProcessInstanceQuery` has to be provided.\nIf both are provided, all instances matching query criterion and instances from the list will be updated with a removal time.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetRemovalTimeToHistoricProcessInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/process-instance/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "hierarchical": true, + "historicProcessInstanceQuery": { + "unfinished": true + }, + "historicProcessInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + }, + "example-2": { + "summary": "POST `/history/process-instance/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "hierarchical": true, + "updateInChunks": true, + "updateChunkSize": 300, + "historicProcessInstanceQuery": { + "unfinished": true + }, + "historicProcessInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/history/process-instance/set-removal-time`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "process-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nRequest was unsuccessfull due to a bad user request. This occurs if some of the query parameters are invalid,\ne. g. if neither `historicProcessInstances` nor `historicProcessInstanceQuery` is present or if no mode is specified.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/process-instance/{id}": { + "delete": { + "operationId": "deleteHistoricProcessInstance", + "tags": [ + "Historic Process Instance" + ], + "summary": "Delete", + "description": "Deletes a process instance from the history by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic process instance to be deleted." + }, + { + "name": "failIfNotExists", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `false`, the request will still be successful if the process id is not found." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nHistoric process instance with given id does not exist." + } + } + }, + "get": { + "operationId": "getHistoricProcessInstance", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get", + "description": "Retrieves a historic process instance by id, according to the `HistoricProcessInstance` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic process instance to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/process-instance/7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e`", + "value": { + "id": "7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e", + "businessKey": null, + "processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt", + "processDefinitionVersion": 1, + "startTime": "2017-02-10T14:33:19.000+0200", + "endTime": null, + "removalTime": null, + "durationInMillis": null, + "startUserId": null, + "startActivityId": "StartEvent_1", + "deleteReason": null, + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "superProcessInstanceId": null, + "superCaseInstanceId": null, + "caseInstanceId": null, + "tenantId": null, + "state": "ACTIVE", + "restartedProcessInstanceId": "2bef365d-3406-11ef-bd73-0a0027000003" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not Found\nHistoric process instance with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/process-instance/{id}/variable-instances": { + "delete": { + "operationId": "deleteHistoricVariableInstancesOfHistoricProcessInstance", + "tags": [ + "Historic Process Instance" + ], + "summary": "Delete Variable Instances", + "description": "Deletes all variables of a process instance from the history by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance for which all historic variables are to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nHistoric process instance with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#parse-exceptions) for the error response format." + } + } + } + }, + "/history/task": { + "get": { + "operationId": "getHistoricTaskInstances", + "tags": [ + "Historic Task Instance" + ], + "summary": "Get Tasks (Historic)", + "description": "Queries for historic tasks that fulfill the given parameters. The size of the result\nset can be retrieved by using the\n[Get Task Count](https://docs.camunda.org/manual/7.22/reference/rest/history/task/get-task-query-count/)\nmethod.", + "parameters": [ + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by task id." + }, + { + "name": "taskParentTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by parent task id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "rootProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by root process instance id." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instances with one of the give business keys.\nThe keys need to be in a comma-separated list." + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that has the parameter value as a substring." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that executed the task." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the case execution that executed the task." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case definition id." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + { + "name": "caseDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed comma-separated activity instance ids." + }, + { + "name": "taskName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given name." + }, + { + "name": "taskNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + { + "name": "taskDescription", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given description." + }, + { + "name": "taskDescriptionLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a description that has the parameter value as a substring." + }, + { + "name": "taskDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given key." + }, + { + "name": "taskDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the passed comma-separated task definition keys." + }, + { + "name": "taskDeleteReason", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given delete reason." + }, + { + "name": "taskDeleteReasonLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a delete reason that has the parameter value as a substring." + }, + { + "name": "taskAssignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user is assigned to." + }, + { + "name": "taskAssigneeLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are assigned to users with the parameter value as a substring." + }, + { + "name": "taskOwner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user owns." + }, + { + "name": "taskOwnerLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are owned by users with the parameter value as a substring." + }, + { + "name": "taskPriority", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Restrict to tasks that have the given priority." + }, + { + "name": "assigned", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + { + "name": "unassigned", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished tasks. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished tasks. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "processFinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks of finished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "processUnfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks of unfinished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "taskDueDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskDueDateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskDueDateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withoutTaskDueDate", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have no due date. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "taskFollowUpDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskFollowUpDateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskFollowUpDateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A task instance must have one of the given\ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic task instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "taskVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that have variables with certain values. Variable filtering expressions are\ncomma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to process instances that have variables with certain\nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`;\n* `notLike`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable name provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable value provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + }, + { + "name": "taskInvolvedUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given user." + }, + { + "name": "taskInvolvedGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given group." + }, + { + "name": "taskHadCandidateUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given candidate user." + }, + { + "name": "taskHadCandidateGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given candidate group." + }, + { + "name": "withCandidateGroups", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateGroups", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "taskId", + "activityInstanceId", + "processDefinitionId", + "processInstanceId", + "executionId", + "duration", + "endTime", + "startTime", + "taskName", + "taskDescription", + "assignee", + "owner", + "dueDate", + "followUpDate", + "deleteReason", + "taskDefinitionKey", + "priority", + "caseDefinitionId", + "caseInstanceId", + "caseExecutionId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricTaskInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/task?taskAssignee\u003danAssignee\u0026priority\u003d42`", + "description": "GET `/history/task?taskAssignee\u003danAssignee\u0026priority\u003d42`", + "value": [ + { + "id": "anId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecution", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "activityInstanceId": "anActInstId", + "name": "aName", + "description": "aDescription", + "deleteReason": "aDeleteReason", + "owner": "anOwner", + "assignee": "anAssignee", + "startTime": "2013-01-23T13:42:42.000+0200", + "endTime": "2013-01-23T13:45:42.000+0200", + "duration": 2000, + "taskDefinitionKey": "aTaskDefinitionKey", + "priority": 42, + "due": "2013-01-23T13:49:42.000+0200", + "parentTaskId": "aParentId", + "followUp:": "2013-01-23T13:44:42.000+0200", + "tenantId": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "taskState": "aTaskState" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricTaskInstances", + "tags": [ + "Historic Task Instance" + ], + "summary": "Get Tasks (Historic) (POST)", + "description": "Queries for historic tasks that fulfill the given parameters. This method is slightly more powerful\nthan the [Get Tasks (Historic)](https://docs.camunda.org/manual/7.22/reference/rest/history/task/get-task-query/) method because\nit allows filtering by multiple process or task variables of types `String`, `Number` or `Boolean`.\nThe size of the result set can be retrieved by using the\n[Get Task Count (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/task/post-task-query-count/)\nmethod.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricTaskInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/task`", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "priority": 10, + "sorting": [ + { + "sortBy": "priority", + "sortOrder": "asc" + }, + { + "sortBy": "duration", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricTaskInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/history/task`", + "description": "POST `/history/task`", + "value": [ + { + "id": "anId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecution", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "activityInstanceId": "anActInstId", + "name": "aName", + "description": "aDescription", + "deleteReason": "aDeleteReason", + "owner": "anOwner", + "assignee": "anAssignee", + "startTime": "2013-01-23T13:42:42.000+0200", + "endTime": "2013-01-23T13:45:42.000+0200", + "duration": 2000, + "taskDefinitionKey": "aTaskDefinitionKey", + "priority": 10, + "due": "2013-01-23T13:49:42.000+0200", + "parentTaskId": "aParentId", + "followUp:": "2013-01-23T13:44:42.000+0200", + "tenantId": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "taskState": "aTaskState" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/task/count": { + "get": { + "operationId": "getHistoricTaskInstancesCount", + "tags": [ + "Historic Task Instance" + ], + "summary": "Get Task Count", + "description": "Queries for the number of historic tasks that fulfill the given parameters.\nTakes the same parameters as the\n[Get Tasks (Historic)](https://docs.camunda.org/manual/7.22/reference/rest/history/task/get-task-query/)\nmethod.", + "parameters": [ + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by task id." + }, + { + "name": "taskParentTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by parent task id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "rootProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by root process instance id." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instances with one of the give business keys.\nThe keys need to be in a comma-separated list." + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that has the parameter value as a substring." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that executed the task." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the case execution that executed the task." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case definition id." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + { + "name": "caseDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed comma-separated activity instance ids." + }, + { + "name": "taskName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given name." + }, + { + "name": "taskNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + { + "name": "taskDescription", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given description." + }, + { + "name": "taskDescriptionLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a description that has the parameter value as a substring." + }, + { + "name": "taskDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given key." + }, + { + "name": "taskDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the passed comma-separated task definition keys." + }, + { + "name": "taskDeleteReason", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given delete reason." + }, + { + "name": "taskDeleteReasonLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a delete reason that has the parameter value as a substring." + }, + { + "name": "taskAssignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user is assigned to." + }, + { + "name": "taskAssigneeLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are assigned to users with the parameter value as a substring." + }, + { + "name": "taskOwner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user owns." + }, + { + "name": "taskOwnerLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are owned by users with the parameter value as a substring." + }, + { + "name": "taskPriority", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Restrict to tasks that have the given priority." + }, + { + "name": "assigned", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + { + "name": "unassigned", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished tasks. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished tasks. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "processFinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks of finished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "processUnfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks of unfinished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "taskDueDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskDueDateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskDueDateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withoutTaskDueDate", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have no due date. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "taskFollowUpDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskFollowUpDateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskFollowUpDateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A task instance must have one of the given\ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic task instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "taskVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that have variables with certain values. Variable filtering expressions are\ncomma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to process instances that have variables with certain\nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`;\n* `notLike`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable name provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable value provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + }, + { + "name": "taskInvolvedUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given user." + }, + { + "name": "taskInvolvedGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given group." + }, + { + "name": "taskHadCandidateUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given candidate user." + }, + { + "name": "taskHadCandidateGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given candidate group." + }, + { + "name": "withCandidateGroups", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateGroups", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/task/count?taskAssginee\u003danAssignee\u0026taskPriority\u003d50`", + "description": "GET `/history/task/count?taskAssginee\u003danAssignee\u0026taskPriority\u003d50`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricTaskInstancesCount", + "tags": [ + "Historic Task Instance" + ], + "summary": "Get Task Count (POST)", + "description": "Queries for the number of historic tasks that fulfill the given parameters. Takes the\nsame parameters as the [Get Tasks (Historic)](https://docs.camunda.org/manual/7.22/reference/rest/history/task/get-task-query/)\nmethod. Corresponds to the size of the result set of the\n[Get Tasks (Historic) (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/task/post-task-query/)\nmethod and takes the same parameters.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricTaskInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/task/count`", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "priority": 10 + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/task/count`", + "description": "POST `/history/task/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/task/report": { + "get": { + "operationId": "getHistoricTaskInstanceReport", + "tags": [ + "Historic Task Instance" + ], + "summary": "Get Task Report (Historic)", + "description": "Retrieves a report of completed tasks. When the report type is set to `count`, the\nreport contains a list of completed task counts where an entry contains the task name, the\ndefinition key of the task, the process definition id, the process definition key, the process\ndefinition name and the count of how many tasks were completed for the specified key in a given\nperiod. When the report type is set to `duration`, the report contains a minimum, maximum and\naverage duration value of all completed task instances in a given period.", + "parameters": [ + { + "name": "reportType", + "in": "query", + "schema": { + "enum": [ + "duration", + "count" + ], + "type": "string" + }, + "description": "**Mandatory.** Specifies the kind of the report to execute. To retrieve a report\nabout the duration of process instances the value must be set to `duration`. For a\nreport of the completed tasks in a specific timespan the value must be set to `count`." + }, + { + "name": "periodUnit", + "in": "query", + "schema": { + "enum": [ + "MONTH", + "QUARTER" + ], + "type": "string" + }, + "description": "When the report type is set to `duration`, this parameter is **mandatory**.\nSpecifies the granularity of the report. Valid values are `month` and `quarter`." + }, + { + "name": "completedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were completed before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "completedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were completed after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "groupBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "When the report type is set to `count`, this parameter is **mandatory**. Groups the\ntasks report by a given criterion. Valid values are `taskName` and `processDefinition`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricTaskInstanceReportResultDto" + } + }, + "examples": { + "example-1": { + "summary": "Request for completed task report", + "description": "GET `/history/task/report?reportType\u003dcount\u0026groupBy\u003dprocessDefinition`", + "value": [ + { + "taskName": null, + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processDefinitionName": "A Process Definition Name", + "count": 42 + }, + { + "taskName": null, + "processDefinitionId": "anotherProcessDefinitionId", + "processDefinitionKey": "anotherProcessDefinitionKey", + "processDefinitionName": "Another Process Definition Name", + "count": 9000 + } + ] + }, + "example-2": { + "summary": "Request for duration report.", + "description": "GET `/history/task/report?reportType\u003dduration\u0026periodUnit\u003dquarter`", + "value": [ + { + "period": 1, + "periodUnit": "QUARTER", + "maximum": 500000, + "minimum": 250000, + "average": 375000 + }, + { + "period": 2, + "periodUnit": "QUARTER", + "maximum": 600000, + "minimum": 300000, + "average": 450000 + }, + { + "period": 3, + "periodUnit": "QUARTER", + "maximum": 1000000, + "minimum": 500000, + "average": 750000 + }, + { + "period": 4, + "periodUnit": "QUARTER", + "maximum": 200000, + "minimum": 100000, + "average": 150000 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `completedAfter`\nparameter is supplied, but the date format is wrong. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/user-operation": { + "get": { + "operationId": "queryUserOperationEntries", + "tags": [ + "Historic User Operation Log" + ], + "summary": "Get User Operation Log (Historic)", + "description": "Queries for user operation log entries that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get User Operation Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/user-operation-log/get-user-operation-log-query-count/)\nmethod.\n\nNote that the properties of operation log entries are interpreted as\nrestrictions on the entities they apply to. That means, if a single\nprocess instance is updated, the field `processInstanceId` is\npopulated. If a single operation updates all process instances of the\nsame process definition, the field `processInstanceId` is `null` (a\n`null` restriction is viewed as a wildcard, i.e., matches a process\ninstance with any id) and the field `processDefinitionId` is\npopulated. This way, which entities were changed by a user operation\ncan easily be reconstructed.", + "parameters": [ + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by execution id." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case definition id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case execution id." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this task." + }, + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this external task." + }, + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this batch." + }, + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations of this user." + }, + { + "name": "operationId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the operation. This allows fetching of multiple entries which are part\nof a composite operation." + }, + { + "name": "operationType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the operation like `Claim` or `Delegate`. See the\n[Javadoc](https://docs.camunda.org/manual/7.22/reference/javadoc/?org/camunda/bpm/engine/history/UserOperationLogEntry.html)\nfor a list of available operation types." + }, + { + "name": "entityType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the entity that was affected by this operation, possible values are\n`Task`, `Attachment` or `IdentityLink`." + }, + { + "name": "entityTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of types of the entities that was affected by this operation,\npossible values are `Task`, `Attachment` or `IdentityLink`." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the category that this operation is associated with, possible values are\n`TaskWorker`, `Admin` or `Operator`." + }, + { + "name": "categoryIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of categories that this operation is associated with, possible values are\n`TaskWorker`, `Admin` or `Operator`." + }, + { + "name": "property", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations that changed this property, e.g., `owner` or `assignee`." + }, + { + "name": "afterTimestamp", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to entries that were created after the given timestamp. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ntimestamp must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "beforeTimestamp", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to entries that were created before the given timestamp. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ntimestamp must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "timestamp" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserOperationLogEntryDto" + } + }, + "examples": { + "example-1": { + "summary": "Gets an operation that updates a single task.", + "description": "GET `/history/user-operation?operationType\u003dClaim\u0026userId\u003ddemo\u0026sortBy\u003dtimestamp\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "anUserOperationLogEntryId", + "deploymentId": "aDeploymentId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": null, + "processInstanceId": "aProcessInstanceId", + "executionId": "anExecutionId", + "taskId": "aTaskId", + "jobId": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "userId": "demo", + "timestamp": "2014-02-25T14:58:37.000+0200", + "operationId": "anOperationId", + "operationType": "Claim", + "entityType": "Task", + "property": "assignee", + "orgValue": null, + "newValue": "demo", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "category": "TaskWorker", + "annotation": "anAnnotation" + } + ] + }, + "example-2": { + "summary": "Gets an operation that updates a multiple process instances with the same key.", + "description": "GET `/history/user-operation?operationType\u003dSuspend\u0026userId\u003ddemo`", + "value": [ + { + "id": "anUserOperationLogEntryId", + "deploymentId": "aDeploymentId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": null, + "executionId": null, + "taskId": null, + "jobId": null, + "jobDefinitionId": null, + "userId": "demo", + "timestamp": "2014-02-25T14:58:37.000+0200", + "operationId": "anOperationId", + "operationType": "Suspend", + "entityType": "ProcessInstance", + "property": "suspensionState", + "orgValue": null, + "newValue": "suspended", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "category": "Operator", + "annotation": "anAnnotation" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/user-operation/count": { + "get": { + "operationId": "queryUserOperationCount", + "tags": [ + "Historic User Operation Log" + ], + "summary": "Get User Operation Log Count", + "description": "Queries for the number of user operation log entries that fulfill the given parameters.\nTakes the same parameters as the\n[Get User Operation Log (Historic)](https://docs.camunda.org/manual/7.22/reference/rest/history/user-operation-log/get-user-operation-log-query/)\nmethod.", + "parameters": [ + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by execution id." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case definition id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case execution id." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this task." + }, + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this external task." + }, + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this batch." + }, + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations of this user." + }, + { + "name": "operationId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the operation. This allows fetching of multiple entries which are part\nof a composite operation." + }, + { + "name": "operationType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the operation like `Claim` or `Delegate`. See the\n[Javadoc](https://docs.camunda.org/manual/7.22/reference/javadoc/?org/camunda/bpm/engine/history/UserOperationLogEntry.html)\nfor a list of available operation types." + }, + { + "name": "entityType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the entity that was affected by this operation, possible values are\n`Task`, `Attachment` or `IdentityLink`." + }, + { + "name": "entityTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of types of the entities that was affected by this operation,\npossible values are `Task`, `Attachment` or `IdentityLink`." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the category that this operation is associated with, possible values are\n`TaskWorker`, `Admin` or `Operator`." + }, + { + "name": "categoryIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of categories that this operation is associated with, possible values are\n`TaskWorker`, `Admin` or `Operator`." + }, + { + "name": "property", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations that changed this property, e.g., `owner` or `assignee`." + }, + { + "name": "afterTimestamp", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to entries that were created after the given timestamp. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ntimestamp must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "beforeTimestamp", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to entries that were created before the given timestamp. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ntimestamp must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., 2013-01-23T14:42:45.000+0200." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/user-operation?operationType\u003dClaim\u0026userId\u003ddemo`", + "description": "GET `/history/user-operation?operationType\u003dClaim\u0026userId\u003ddemo`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/user-operation/{operationId}/clear-annotation": { + "put": { + "operationId": "clearAnnotationUserOperationLog", + "tags": [ + "Historic User Operation Log" + ], + "summary": "Clear Annotation of an User Operation Log (Historic)", + "description": "Clear the annotation which was previously set for auditing reasons.", + "parameters": [ + { + "name": "operationId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The operation id of the operation log to be updated." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid, for example if the\n`operationId` path parameter value does not exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/user-operation/{operationId}/set-annotation": { + "put": { + "operationId": "setAnnotationUserOperationLog", + "tags": [ + "Historic User Operation Log" + ], + "summary": "Set Annotation to an User Operation Log (Historic)", + "description": "Set an annotation for auditing reasons.", + "parameters": [ + { + "name": "operationId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The operation id of the operation log to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/history/user-operation/a02a5890-ad41-11e9-8609-c6bbb7c7e9e3/set-annotation`", + "value": { + "annotation": "Instances restarted due to wrong turn" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid, for example if the\n`operationId` path parameter value does not exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/variable-instance": { + "get": { + "operationId": "getHistoricVariableInstances", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instances", + "description": "Queries for historic variable instances that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Variable Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/variable-instance/get-variable-instance-query-count/)\nmethod.", + "parameters": [ + { + "name": "variableName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable name." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to variables with a name like the parameter." + }, + { + "name": "variableValue", + "in": "query", + "schema": { + "type": "object" + }, + "description": "Filter by variable value. Is treated as a `String` object on server side." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable name provided in `variableName` and `variableNameLike` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable value provided in `variableValue` case-insensitively. If set to `true`\n**variableValue** and **variablevalue** are treated as equal." + }, + { + "name": "variableTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type\n\u0027serializable\u0027." + }, + { + "name": "includeDeleted", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include variables that has already been deleted during the execution." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process instance the variable belongs to." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-separated process instance ids." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the variable belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a key of the process definition the variable belongs to." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated execution ids." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case instance the variable belongs to." + }, + { + "name": "caseExecutionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated case execution ids." + }, + { + "name": "caseActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated case activity ids." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated task ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated activity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic variable instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "variableNameIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-separated variable names." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "instanceId", + "variableName", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricVariableInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/variable-instance?variableName\u003dmy_variable`", + "description": "GET `/history/variable-instance?variableName\u003dmy_variable`", + "value": [ + { + "id": "someId", + "name": "my_variable", + "type": "String", + "value": "my_value", + "valueInfo": {}, + "processDefinitionKey": "aVariableInstanceProcDefKey", + "processDefinitionId": "aVariableInstanceProcDefId", + "processInstanceId": "aVariableInstanceProcInstId", + "executionId": "aVariableInstanceExecutionId", + "activityInstanceId": "aVariableInstanceActivityInstId", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "errorMessage": null, + "state": "CREATED", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricVariableInstances", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instances (POST)", + "description": "Queries for historic variable instances that fulfill the given parameters.\nThis method is slightly more powerful than the\n[Get Variable Instances](https://docs.camunda.org/manual/7.22/reference/rest/history/variable-instance/get-variable-instance-query/)\nmethod because it allows filtering by variable values of the different\ntypes `String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricVariableInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/variable-instance`", + "value": { + "variableName": "someVariable", + "variableValue": 42, + "sorting": [ + { + "sortBy": "variableName", + "sortOrder": "asc" + }, + { + "sortBy": "instanceId", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricVariableInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/history/variable-instance`", + "description": "POST `/history/variable-instance`", + "value": [ + { + "id": "someId", + "name": "someVariable", + "type": "Integer", + "variableType": "integer", + "value": 5, + "valueInfo": {}, + "processDefinitionKey": "aProcessDefinitionKey", + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcInstId", + "executionId": "aExecutionId", + "activityInstanceId": "aActivityInstId", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "errorMessage": null, + "state": "CREATED", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/variable-instance/count": { + "get": { + "operationId": "getHistoricVariableInstancesCount", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instance Count", + "description": "Queries for the number of historic variable instances that fulfill the given\nparameters.\nTakes the same parameters as the\n[Get Variable Instances](https://docs.camunda.org/manual/7.22/reference/rest/history/variable-instance/get-variable-instance-query/)\nmethod.", + "parameters": [ + { + "name": "variableName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable name." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to variables with a name like the parameter." + }, + { + "name": "variableValue", + "in": "query", + "schema": { + "type": "object" + }, + "description": "Filter by variable value. Is treated as a `String` object on server side." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable name provided in `variableName` and `variableNameLike` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable value provided in `variableValue` case-insensitively. If set to `true`\n**variableValue** and **variablevalue** are treated as equal." + }, + { + "name": "variableTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type\n\u0027serializable\u0027." + }, + { + "name": "includeDeleted", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include variables that has already been deleted during the execution." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process instance the variable belongs to." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-separated process instance ids." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the variable belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a key of the process definition the variable belongs to." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated execution ids." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case instance the variable belongs to." + }, + { + "name": "caseExecutionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated case execution ids." + }, + { + "name": "caseActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated case activity ids." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated task ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated activity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic variable instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "variableNameIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-separated variable names." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/variable-instance/count?variableName\u003dmy_variable`", + "description": "GET `/history/variable-instance/count?variableName\u003dmy_variable`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricVariableInstancesCount", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instance Count (POST)", + "description": "Queries for historic variable instances that fulfill the given parameters.\nThis method takes the same message body as the\n[Get Variable Instances (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/variable-instance/post-variable-instance-query/)\nmethod and therefore it is more powerful regarding variable values\nthan the\n[Get Variable Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/variable-instance/get-variable-instance-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricVariableInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/variable-instance/count`", + "value": { + "variableName": "someVariable", + "variableValue": 42 + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/variable-instance/count`", + "description": "POST `/history/variable-instance/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/variable-instance/{id}": { + "delete": { + "operationId": "deleteHistoricVariableInstance", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Delete Variable Instance", + "description": "Deletes a historic variable instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the variable instance." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getHistoricVariableInstance", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instance", + "description": "Retrieves a historic variable by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the variable instance." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricVariableInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/variable-instance/someId`", + "value": { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "valueInfo": {}, + "processDefinitionKey": "aProcessDefinitionKey", + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "aExecutionId", + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "errorMessage": null, + "state": "CREATED", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/variable-instance/{id}/data": { + "get": { + "operationId": "getHistoricVariableInstanceBinary", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instance (Binary)", + "description": "Retrieves the content of a historic variable by id. Applicable for variables that\nare serialized as binary data.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the variable instance." + } + ], + "responses": { + "200": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/octet-stream` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/history/variable-instance/someId/data`", + "description": "For binary variables or files without any MIME type information, a byte stream is returned.", + "value": "" + } + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `*/*` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/history/variable-instance/someId/data`", + "description": "File variables with MIME type information are returned as the saved type. Additionally,\n for file variables the Content-Disposition header will be set.", + "value": "" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id exists but is not a binary variable. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/identity/groups": { + "get": { + "operationId": "getGroupInfo", + "tags": [ + "Identity" + ], + "summary": "Get a User\u0027s Groups", + "description": "Gets the groups of a user by id and includes all users that share a group with the\ngiven user.", + "parameters": [ + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to get the groups for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentityServiceGroupInfoDto" + }, + "examples": { + "example-1": { + "description": "GET `/identity/groups?userId\u003daUserId`", + "value": { + "groups": [ + { + "id": "group1Id", + "name": "group1" + } + ], + "groupUsers": [ + { + "firstName": "firstName", + "lastName": "lastName", + "displayName": "firstName lastName", + "id": "anotherUserId" + } + ] + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the `userId` query parameter is missing. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/identity/password-policy": { + "get": { + "operationId": "getPasswordPolicy", + "tags": [ + "Identity" + ], + "summary": "Get Password Policy", + "description": "A password policy consists of a list of rules that new passwords must follow to be\npolicy compliant. This end point returns a JSON representation of the\nlist of policy rules. More information on password policies in Camunda can be found in the password policy\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/password-policy/) and in\nthe [security instructions](https://docs.camunda.org/manual/7.22/user-guide/security/).", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordPolicyDto" + }, + "examples": { + "example-1": { + "description": "GET `/identity/password-policy`", + "value": { + "rules": [ + { + "placeholder": "PASSWORD_POLICY_USER_DATA", + "parameter": null + }, + { + "placeholder": "PASSWORD_POLICY_LENGTH", + "parameter": { + "minLength": "10" + } + }, + { + "placeholder": "PASSWORD_POLICY_LOWERCASE", + "parameter": { + "minLowerCase": "1" + } + }, + { + "placeholder": "PASSWORD_POLICY_UPPERCASE", + "parameter": { + "minUpperCase": "1" + } + }, + { + "placeholder": "PASSWORD_POLICY_DIGIT", + "parameter": { + "minDigit": "1" + } + }, + { + "placeholder": "PASSWORD_POLICY_SPECIAL", + "parameter": { + "minSpecial": "1" + } + } + ] + } + } + } + } + }, + "description": "Request successful. This example uses the built-in password policy that enforces a minimum password length,\nand some complexity rules." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No password policy was found." + } + } + }, + "post": { + "operationId": "checkPassword", + "tags": [ + "Identity" + ], + "summary": "Validate Password", + "description": "A password policy consists of a list of rules that new passwords must follow to be\npolicy compliant. A password can be checked for compliancy via this\nend point. More information on password policies in Camunda can be found in the password policy\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/password-policy/) and in\nthe [security instructions](https://docs.camunda.org/manual/7.22/user-guide/security/).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordPolicyRequestDto" + }, + "examples": { + "example-1": { + "summary": "POST `/identity/password-policy`", + "value": { + "password": "myPassword", + "profile": { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "jonny@camunda.org" + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CheckPasswordPolicyResultDto" + }, + "examples": { + "example-1": { + "description": "POST `/identity/password-policy`", + "value": { + "rules": [ + { + "placeholder": "PASSWORD_POLICY_USER_DATA", + "parameter": null, + "valid": true + }, + { + "placeholder": "PASSWORD_POLICY_LOWERCASE", + "parameter": { + "minLowerCase": "1" + }, + "valid": true + }, + { + "placeholder": "PASSWORD_POLICY_LENGTH", + "parameter": { + "minLength": "10" + }, + "valid": false + }, + { + "placeholder": "PASSWORD_POLICY_UPPERCASE\"", + "parameter": { + "minUpperCase": "1" + }, + "valid": false + }, + { + "placeholder": "PASSWORD_POLICY_DIGIT", + "parameter": { + "minDigit": "1" + }, + "valid": false + }, + { + "placeholder": "PASSWORD_POLICY_SPECIAL", + "parameter": { + "minSpecial": "1" + }, + "valid": false + } + ], + "valid": false + } + } + } + } + }, + "description": "Request successful. This example uses the built-in password policy that enforces a minimum password length, and\nsome complexity rules. The checked password is myPassword which is not complex enough to match all of\nthe policy rules." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No password policy was found to check the password against." + } + } + } + }, + "/identity/verify": { + "post": { + "operationId": "verifyUser", + "tags": [ + "Identity" + ], + "summary": "Verify User", + "description": "Verifies that user credentials are valid.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BasicUserCredentialsDto" + }, + "examples": { + "example-1": { + "summary": "POST `/identity/verify`", + "value": { + "username": "testUser", + "password": "testPassword" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/identity/verify`", + "value": { + "authenticatedUser": "testUser", + "authenticated": true + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If body does not contain username or password." + } + } + } + }, + "/incident": { + "get": { + "operationId": "getIncidents", + "tags": [ + "Incident" + ], + "summary": "Get List", + "description": "Queries for incidents that fulfill given parameters. The size of the result set can be retrieved by using\nthe [Get Incident Count](https://docs.camunda.org/manual/7.22/reference/rest/incident/get-query-count/) method.", + "parameters": [ + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to the given incident type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident\ntypes." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident message." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that incidents message is a substring of the given value. The string can include\nthe wildcard character \u0027%\u0027 to express like-strategy: starts with (`string%`), ends with (`%string`) or\ncontains (`%string%`)." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given keys. Must be a\ncomma-separated list." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process instance with the given id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an execution with the given id." + }, + { + "name": "incidentTimestampBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an incidentTimestamp date before the given date. \nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "incidentTimestampAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an incidentTimestamp date after the given date. \nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an activity with the given id." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that were created due to the failure of an activity with the given id." + }, + { + "name": "causeIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as cause incident." + }, + { + "name": "rootCauseIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as root cause incident." + }, + { + "name": "configuration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as configuration." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated tenant ids." + }, + { + "name": "jobDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated job definition ids." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "incidentId", + "incidentMessage", + "incidentTimestamp", + "incidentType", + "executionId", + "activityId", + "processInstanceId", + "processDefinitionId", + "causeIncidentId", + "rootCauseIncidentId", + "configuration", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/incident/anIncidentId`", + "value": [ + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "incidentTimestamp": "2014-03-01T08:00:00.000+0200", + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "tenantId": null, + "incidentMessage": "anIncidentMessage", + "jobDefinitionId": "aJobDefinitionId", + "annotation": "an annotation" + }, + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anotherExecutionId", + "incidentTimestamp": "2014-03-01T09:00:00.000+0200", + "incidentType": "customIncidentType", + "activityId": "userTask", + "failedActivityId": "userTask", + "causeIncidentId": "anotherCauseIncidentId", + "rootCauseIncidentId": "anotherRootCauseIncidentId", + "configuration": "anotherConfiguration", + "tenantId": null, + "incidentMessage": "anotherIncidentMessage", + "jobDefinitionId": null, + "annotation": "another annotation" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error\nresponse format." + } + } + } + }, + "/incident/count": { + "get": { + "operationId": "getIncidentsCount", + "tags": [ + "Incident" + ], + "summary": "Get List Count", + "description": "Queries for the number of incidents that fulfill given parameters. Takes the same parameters as the\n[Get Incidents](https://docs.camunda.org/manual/7.22/reference/rest/incident/get-query/) method.", + "parameters": [ + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to the given incident type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident\ntypes." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident message." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that incidents message is a substring of the given value. The string can include\nthe wildcard character \u0027%\u0027 to express like-strategy: starts with (`string%`), ends with (`%string`) or\ncontains (`%string%`)." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given keys. Must be a\ncomma-separated list." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process instance with the given id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an execution with the given id." + }, + { + "name": "incidentTimestampBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an incidentTimestamp date before the given date. \nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "incidentTimestampAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an incidentTimestamp date after the given date. \nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an activity with the given id." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that were created due to the failure of an activity with the given id." + }, + { + "name": "causeIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as cause incident." + }, + { + "name": "rootCauseIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as root cause incident." + }, + { + "name": "configuration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as configuration." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated tenant ids." + }, + { + "name": "jobDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated job definition ids." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/incident/count?processInstanceId\u003daProcInstId`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error\nresponse format." + } + } + } + }, + "/incident/{id}": { + "delete": { + "operationId": "resolveIncident", + "tags": [ + "Incident" + ], + "summary": "Resolve Incident", + "description": "Resolves an incident with given id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the incident to be resolved." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if an incident with given id does not exist." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if an incident is not related to any execution or an incident is of type `failedJob` or\n`failedExternalTask`. To resolve such an incident, please refer to the\n[Incident Types](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) section." + } + } + }, + "get": { + "operationId": "getIncident", + "tags": [ + "Incident" + ], + "summary": "Get Incident", + "description": "Retrieves an incident by ID.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the incident to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IncidentDto" + }, + "examples": { + "example-1": { + "summary": "GET `/incident/anIncidentId`", + "value": { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "incidentTimestamp": "2014-03-01T08:00:00.000+0200", + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "tenantId": null, + "incidentMessage": "anIncidentMessage", + "jobDefinitionId": "aJobDefinitionId", + "annotation": "an annotation" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if an incident with given id does not exist." + } + } + } + }, + "/incident/{id}/annotation": { + "delete": { + "operationId": "clearIncidentAnnotation", + "tags": [ + "Incident" + ], + "summary": "Clear Incident Annotation", + "description": "Clears the annotation of an incident with given id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the incident to clear the annotation at." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if no incident can be found for the given id." + } + } + }, + "put": { + "operationId": "setIncidentAnnotation", + "tags": [ + "Incident" + ], + "summary": "Set Incident Annotation", + "description": "Sets the annotation of an incident with given id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the incident to clear the annotation at." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/incident/7c80cc8f-ef95-11e6-b6e6-34f39ab71d4b/annotation`", + "value": { + "annotation": "my annotation" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if no incident can be found for the given id." + } + } + } + }, + "/job": { + "get": { + "operationId": "getJobs", + "tags": [ + "Job" + ], + "summary": "Get Jobs", + "description": "Queries for jobs that fulfill given parameters.\nThe size of the result set can be retrieved by using the [Get Job\nCount](https://docs.camunda.org/manual/7.22/reference/rest/job/get-query-count/) method.", + "parameters": [ + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of job ids." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given job definition." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given process instance." + }, + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given comma-separated list of process instance ids." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given execution." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process definition the jobs run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the jobs run on." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for an activity with the given id." + }, + { + "name": "withRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which have retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "executable", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which are executable, i.e., retries \u003e 0 and due date is `null` or due\ndate is in the past. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "timers", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that are timers. Cannot be used together with `messages`. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "messages", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that are messages. Cannot be used together with `timers`. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "dueDates", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs where the due date is lower or higher than the given date.\nDue date expressions are comma-separated and are structured as follows:\n\nA valid condition value has the form `operator_value`.\n`operator` is the comparison operator to be used and `value` the date value\nas string.\n\nValid operator values are: `gt` - greater than; `lt` - lower than.\n`value` may not contain underscore or comma characters." + }, + { + "name": "createTimes", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs created before or after the given date.\n\nCreate time expressions are comma-separated and are structured as\nfollows:\n\nA valid condition value has the form `operator_value`.\n`operator` is the comparison operator to be used and `value` the date value\nas string.\n\nValid operator values are: `gt` - greater than; `lt` - lower than.\n`value` may not contain underscore or comma characters." + }, + { + "name": "withException", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that failed due to an exception. Value may only be `true`, as `false` is\nthe default behavior." + }, + { + "name": "exceptionMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs that failed due to an exception with the given message." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs that failed due to an exception at an activity with the given id." + }, + { + "name": "noRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which have no retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active jobs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended jobs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority lower than or equal to the given value. Value must be a\nvalid `long` value." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority higher than or equal to the given value. Value must be a\nvalid `long` value." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include jobs which belong to one of the passed comma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include jobs which belong to no tenant. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "includeJobsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include jobs which belong to no tenant. Can be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "jobId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "jobPriority", + "jobRetries", + "jobDueDate", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobDto" + } + }, + "examples": { + "example-1": { + "description": "GET `/job/count?dueDates\u003dgt_2012-07-17T17:00:00.000+0200,lt_2012-07-17T18:00:00.000+0200\u0026createTimes\u003dgt_2012-05-05T10:00:00.000+0200,lt_2012-07-16T15:00:00.000+0200`", + "value": [ + { + "id": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "dueDate": "2018-07-17T17:05:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aPDKey", + "executionId": "anExecutionId", + "retries": 0, + "exceptionMessage": "An exception Message", + "failedActivityId": "anActivityId", + "suspended": false, + "priority": 10, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": "aBatchId" + }, + { + "id": "anotherJobId", + "jobDefinitionId": "anotherJobDefinitionId", + "dueDate": "2018-07-17T17:55:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "anotherPDId", + "processDefinitionKey": "anotherPDKey", + "executionId": "anotherExecutionId", + "retries": 0, + "exceptionMessage": "Another exception Message", + "failedActivityId": "anotherActivityId", + "suspended": true, + "priority": 8, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor due date comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryJobs", + "tags": [ + "Job" + ], + "summary": "Get Jobs (POST)", + "description": "Queries for jobs that fulfill given parameters. This method is slightly more\npowerful than the [Get Jobs](https://docs.camunda.org/manual/7.22/reference/rest/job/get-query/)\nmethod because it allows filtering by multiple jobs of types `String`,\n`Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job`", + "value": { + "dueDates": [ + { + "operator": "gt", + "value": "2018-07-17T17:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2018-07-17T18:00:00.000+0200" + } + ], + "createTimes": [ + { + "operator": "gt", + "value": "2012-05-05T10:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-16T15:00:00.000+0200" + } + ], + "sorting": [ + { + "sortBy": "jobDueDate", + "sortOrder": "asc" + }, + { + "sortBy": "jobRetries", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobDto" + } + }, + "examples": { + "example-1": { + "description": "POST `/job`", + "value": [ + { + "id": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "dueDate": "2018-07-17T17:05:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aPDKey", + "executionId": "anExecutionId", + "retries": 0, + "exceptionMessage": "An exception Message", + "failedActivityId": "anActivityId", + "suspended": false, + "priority": 10, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": "aBatchId" + }, + { + "id": "anotherJobId", + "jobDefinitionId": "anotherJobDefinitionId", + "dueDate": "2018-07-17T17:55:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "anotherPDId", + "processDefinitionKey": "anotherPDKey", + "executionId": "anotherExecutionId", + "retries": 0, + "exceptionMessage": "Another exception Message", + "failedActivityId": "anotherActivityId", + "suspended": true, + "priority": 8, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor due date comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition": { + "get": { + "operationId": "getJobDefinitions", + "tags": [ + "Job Definition" + ], + "summary": "Get Job Definitions", + "description": "Queries for job definitions that fulfill given parameters.\nThe size of the result set can be retrieved by using the\n[Get Job Definition Count](https://docs.camunda.org/manual/7.22/reference/rest/job-definition/get-query-count/)\nmethod.", + "parameters": [ + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed and comma-separated activity ids." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given process definition key." + }, + { + "name": "jobType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given job type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job types." + }, + { + "name": "jobConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given job configuration. For example: for\ntimer jobs it is the timer configuration." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active job definitions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended job definitions. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "withOverridingJobPriority", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include job definitions that have an overriding job priority defined. The only\neffective value is `true`. If set to `false`, this filter is not applied." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed and comma-separated tenant\nids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include job definitions which belong to no tenant. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "includeJobDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include job definitions which belong to no tenant. Can be used in combination with\n`tenantIdIn`. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "jobDefinitionId", + "activityId", + "processDefinitionId", + "processDefinitionKey", + "jobType", + "jobConfiguration", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/job-definition?activityIdIn\u003dServiceTask1,ServiceTask2`", + "description": "GET `/job-definition?activityIdIn\u003dServiceTask1,ServiceTask2`", + "value": [ + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask1", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": false, + "overridingJobPriority": 15, + "tenantId": null, + "deploymentId": "aDeploymentId" + }, + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask2", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": true, + "overridingJobPriority": null, + "tenantId": null, + "deploymentId": "aDeploymentId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryJobDefinitions", + "tags": [ + "Job Definition" + ], + "summary": "Get Job Definitions (POST)", + "description": "Queries for job definitions that fulfill given parameters. This method is slightly\nmore powerful than the\n[Get Job Definitions](https://docs.camunda.org/manual/7.22/reference/rest/job-definition/get-query/)\nmethod because it allows filtering by multiple job definitions of\ntypes `String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job-definition`", + "value": { + "activityIdIn": [ + "ServiceTask1", + "ServiceTask2" + ], + "sorting": [ + { + "sortBy": "activityId", + "sortOrder": "asc" + }, + { + "sortBy": "jobType", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/job-definition`", + "description": "POST `/job-definition`", + "value": [ + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask1", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": false, + "overridingJobPriority": 15, + "tenantId": null, + "deploymentId": "aDeploymentId" + }, + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask2", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": true, + "overridingJobPriority": null, + "tenantId": null, + "deploymentId": "aDeploymentId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/count": { + "get": { + "operationId": "getJobDefinitionsCount", + "tags": [ + "Job Definition" + ], + "summary": "Get Job Definition Count", + "description": "Queries for the number of job definitions that fulfill given parameters.\nTakes the same parameters as the\n[Get Job Definitions](https://docs.camunda.org/manual/7.22/reference/rest/job-definition/get-query/)\nmethod.", + "parameters": [ + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed and comma-separated activity ids." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given process definition key." + }, + { + "name": "jobType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given job type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job types." + }, + { + "name": "jobConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given job configuration. For example: for\ntimer jobs it is the timer configuration." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active job definitions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended job definitions. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "withOverridingJobPriority", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include job definitions that have an overriding job priority defined. The only\neffective value is `true`. If set to `false`, this filter is not applied." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed and comma-separated tenant\nids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include job definitions which belong to no tenant. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "includeJobDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include job definitions which belong to no tenant. Can be used in combination with\n`tenantIdIn`. Value may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/job-definition/count?activityIdIn\u003dServiceTask1,ServiceTask2`", + "description": "GET `/job-definition/count?activityIdIn\u003dServiceTask1,ServiceTask2`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryJobDefinitionsCount", + "tags": [ + "Job Definition" + ], + "summary": "Get Job Definition Count (POST)", + "description": "Queries for the number of job definitions that fulfill given parameters. This\nmethod takes the same message body as the\n[Get Job Definitions (POST)](https://docs.camunda.org/manual/7.22/reference/rest/job-definition/post-query/)\nmethod and therefore it is slightly more powerful than the\n[Get Job Definition Count](https://docs.camunda.org/manual/7.22/reference/rest/job-definition/get-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job-definition/count`", + "value": { + "activityIdIn": [ + "ServiceTask1", + "ServiceTask2" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job-definition/count`", + "description": "POST `/job-definition/count`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/suspended": { + "put": { + "operationId": "updateSuspensionStateJobDefinitions", + "tags": [ + "Job Definition" + ], + "summary": "Activate/Suspend Job Definitions", + "description": "Activates or suspends job definitions with the given process definition id or process definition key.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionsSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "suspend by process definition id", + "description": "PUT `/job-definition/suspended`", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "suspended": true, + "includeJobs": true, + "executionDate": "2013-11-21T10:49:45.000+0200" + } + }, + "example-2": { + "summary": "suspend by process definition key", + "description": "PUT `/job-definition/suspended`", + "value": { + "processDefinitionKey": "aProcessDefinitionKey", + "suspended": true, + "includeJobs": true, + "executionDate": "2013-11-21T10:49:45.000+0200" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid, for example if the provided\n`executionDate` parameter doesn\u0027t have the expected format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/{id}": { + "get": { + "operationId": "getJobDefinition", + "tags": [ + "Job Definition" + ], + "summary": "Get Job Definition", + "description": "Retrieves a job definition by id, according to the `JobDefinition` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job definition to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "GET `/job-definition/aJobDefinitionId`", + "description": "GET `/job-definition/aJobDefinitionId`", + "value": { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask1", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": false, + "overridingJobPriority": 15, + "tenantId": null, + "deploymentId": "aDeploymentId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/{id}/jobPriority": { + "put": { + "operationId": "setJobPriorityJobDefinition", + "tags": [ + "Job Definition" + ], + "summary": "Set Job Definition Priority by Id", + "description": "Sets an overriding execution priority for jobs with the given definition id.\nOptionally, the priorities of all the definitions\u0027 existing jobs are\nupdated accordingly. The priority can be reset by setting it to\n`null`, meaning that a new job\u0027s priority will not be determined based\non its definition\u0027s priority any longer. See the\n[user guide on job prioritization](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#set-job-definition-priorities-via-managementservice-api)\nfor details.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job definition to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionPriorityDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job-definition/aJobDefId/jobPriority`", + "value": { + "priority": 10, + "includeJobs": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The retries could not be set successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/{id}/retries": { + "put": { + "operationId": "setJobRetriesJobDefinition", + "tags": [ + "Job Definition" + ], + "summary": "Set Job Retries By Job Definition Id", + "description": "Sets the number of retries of all **failed** jobs associated with the given job\ndefinition id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job definition to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RetriesDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job-definition/aJobDefId/retries`", + "value": { + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The retries could not be set successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/{id}/suspended": { + "put": { + "operationId": "updateSuspensionStateJobDefinition", + "tags": [ + "Job Definition" + ], + "summary": "Activate/Suspend Job Definition By Id", + "description": "Activates or suspends a given job definition by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job definition to activate or suspend." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job-definition/aJobDefinitionId/suspended`", + "value": { + "suspended": true, + "includeJobs": true, + "executionDate": "2013-11-21T10:49:45.000+0200" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid, for example if the provided\n`executionDate` parameter doesn\u0027t have the expected format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/count": { + "get": { + "operationId": "getJobsCount", + "tags": [ + "Job" + ], + "summary": "Get Job Count", + "description": "Queries for the number of jobs that fulfill given parameters.\nTakes the same parameters as the [Get\nJobs](https://docs.camunda.org/manual/7.22/reference/rest/job/get-query/) method.", + "parameters": [ + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of job ids." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given job definition." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given process instance." + }, + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given comma-separated list of process instance ids." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given execution." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process definition the jobs run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the jobs run on." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for an activity with the given id." + }, + { + "name": "withRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which have retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "executable", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which are executable, i.e., retries \u003e 0 and due date is `null` or due\ndate is in the past. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "timers", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that are timers. Cannot be used together with `messages`. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "messages", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that are messages. Cannot be used together with `timers`. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "dueDates", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs where the due date is lower or higher than the given date.\nDue date expressions are comma-separated and are structured as follows:\n\nA valid condition value has the form `operator_value`.\n`operator` is the comparison operator to be used and `value` the date value\nas string.\n\nValid operator values are: `gt` - greater than; `lt` - lower than.\n`value` may not contain underscore or comma characters." + }, + { + "name": "createTimes", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs created before or after the given date.\n\nCreate time expressions are comma-separated and are structured as\nfollows:\n\nA valid condition value has the form `operator_value`.\n`operator` is the comparison operator to be used and `value` the date value\nas string.\n\nValid operator values are: `gt` - greater than; `lt` - lower than.\n`value` may not contain underscore or comma characters." + }, + { + "name": "withException", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that failed due to an exception. Value may only be `true`, as `false` is\nthe default behavior." + }, + { + "name": "exceptionMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs that failed due to an exception with the given message." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs that failed due to an exception at an activity with the given id." + }, + { + "name": "noRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which have no retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active jobs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended jobs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority lower than or equal to the given value. Value must be a\nvalid `long` value." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority higher than or equal to the given value. Value must be a\nvalid `long` value." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include jobs which belong to one of the passed comma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include jobs which belong to no tenant. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "includeJobsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include jobs which belong to no tenant. Can be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "GET `/job/count?dueDates\u003dgt_2012-07-17T17:00:00.000+0200,lt_2012-07-17T18:00:00.000+0200\u0026createTimes\u003dgt_2012-05-05T10:00:00.000+0200,lt_2012-07-16T15:00:00.000+0200`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example, if an invalid operator\nfor due date comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryJobsCount", + "tags": [ + "Job" + ], + "summary": "Get Job Count (POST)", + "description": "Queries for jobs that fulfill given parameters. This method takes the same message\nbody as the [Get Jobs POST](https://docs.camunda.org/manual/7.22/reference/rest/job/post-\nquery/) method and therefore it is slightly more powerful than the\n[Get Job Count](https://docs.camunda.org/manual/7.22/reference/rest/job/get-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job/count`", + "value": { + "dueDates": [ + { + "operator": "gt", + "value": "2012-07-17T17:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-17T18:00:00.000+0200" + } + ], + "createTimes": [ + { + "operator": "gt", + "value": "2012-05-05T10:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-16T15:00:00.000+0200" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "POST `/job/count`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example, if an invalid operator\nfor due date comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/retries": { + "post": { + "operationId": "setJobRetriesAsyncOperation", + "tags": [ + "Job" + ], + "summary": "Set Job Retries Async (POST)", + "description": "Create a batch to set retries of jobs asynchronously.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetJobRetriesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job/retries`", + "value": { + "retries": 5, + "dueDate": "2017-04-06T13:57:45.000+0200", + "jobIds": [ + "aJob", + "secondJob" + ], + "jobQuery": { + "dueDates": [ + { + "operator": "gt", + "value": "2012-07-17T17:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-17T18:00:00.000+0200" + } + ] + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 OK", + "description": "POST `/job/retries`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspened": false, + "tenantId": "aTenantId", + "createUserId": "userId" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if neither\nprocessInstanceIds nor processInstanceQuery is present. Or if the\nretry count is not specified. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/suspended": { + "put": { + "operationId": "updateSuspensionStateBy", + "tags": [ + "Job" + ], + "summary": "Activate/Suspend Jobs", + "description": "Activates or suspends jobs matching the given criterion.\nThis can only be on of:\n* `jobDefinitionId`\n* `processDefinitionId`\n* `processInstanceId`\n* `processDefinitionKey`", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "Activates or suspends jobs with the given job definition id. PUT `/job/suspended`", + "value": { + "jobDefinitionId": "aJobDefinitionId", + "suspended": true + } + }, + "example-2": { + "summary": "Activates or suspends jobs with the given process definition id. PUT `/job/suspended`", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "suspended": true + } + }, + "example-3": { + "summary": "Activates or suspends jobs with the given process instance id. PUT `/job/suspended`", + "value": { + "processInstanceId": "aProcessInstanceId", + "suspended": true + } + }, + "example-4": { + "summary": "Activates or suspends jobs with the given process definition key. PUT `/job/suspended`", + "value": { + "processDefinitionKey": "aProcessDefinitionKey", + "suspended": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the request parameters are invalid, for example, if `jobDefinitionId` and\n`processDefinitionId` are both specified.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}": { + "delete": { + "operationId": "deleteJob", + "tags": [ + "Job" + ], + "summary": "Delete Job", + "description": "Deletes a job by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The job could not be deleted. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getJob", + "tags": [ + "Job" + ], + "summary": "Get Job", + "description": "Retrieves a job by id, according to the `Job` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDto" + }, + "examples": { + "example-1": { + "description": "GET `/job/aJobId`", + "value": { + "id": "aJobId", + "jobDefinitionId": "f9eec330-e3ff-11e8-8f7d-e4a7a094a9d6", + "dueDate": "2018-07-17T17:00:00+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "timer:1:f9ee9c1f-e3ff-11e8-8f7d-e4a7a094a9d6", + "processDefinitionKey": "timer", + "executionId": "anExecutionId", + "retries": 0, + "exceptionMessage": "An exception Message", + "failedActivityId": "anActivityId", + "suspended": false, + "priority": 10, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": "aBatchId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/duedate": { + "put": { + "operationId": "setJobDuedate", + "tags": [ + "Job" + ], + "summary": "Set Job Due Date", + "description": "Updates the due date of a job by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDuedateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job/aJobId/duedate`", + "value": { + "duedate": "2013-08-13T18:43:28.000+0200", + "cascade": false + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The due date could not be set successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/duedate/recalculate": { + "post": { + "operationId": "recalculateDuedate", + "tags": [ + "Job" + ], + "summary": "Recalculate Job Due Date", + "description": "Recalculates the due date of a job by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be updated." + }, + { + "name": "creationDateBased", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Recalculate the due date based on the creation date of the job or the current date.\nValue may only be `false`, as `true` is the default behavior. " + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The due date could not be recalculated successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/execute": { + "post": { + "operationId": "executeJob", + "tags": [ + "Job" + ], + "summary": "Execute Job", + "description": "Executes a job by id. **Note:** The execution of the job happens synchronously in\nthe same thread.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be executed." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The job could not be executed successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/priority": { + "put": { + "operationId": "setJobPriority", + "tags": [ + "Job" + ], + "summary": "Set Job Priority", + "description": "Sets the execution priority of a job by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PriorityDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job/aJobId/priority`", + "value": { + "priority": 10 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The priority could not be set successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/retries": { + "put": { + "operationId": "setJobRetries", + "tags": [ + "Job" + ], + "summary": "Set Job Retries", + "description": "Sets the retries of the job to the given number of retries by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobRetriesDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job/aJobId/retries`", + "value": { + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The retries could not be set successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/stacktrace": { + "get": { + "operationId": "getStacktrace", + "tags": [ + "Job" + ], + "summary": "Get Exception Stacktrace", + "description": "Retrieves the exception stacktrace corresponding to the passed job id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to get the exception stacktrace for." + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": {}, + "examples": { + "example-1": { + "description": "GET `/job/aJobId/stacktrace`", + "value": "java.lang.RuntimeException: A exception message!\n at org.camunda.bpm.pa.service.FailingDelegate.execute(FailingDelegate.java:10)\n at org.camunda.bpm.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34)\n at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)\n ..." + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/suspended": { + "put": { + "operationId": "updateJobSuspensionState", + "tags": [ + "Job" + ], + "summary": "Activate/Suspend Job By Id", + "description": "Activates or suspends a given job by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to activate or suspend." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job/aJobId/suspended`", + "value": { + "suspended": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + } + } + } + }, + "/message": { + "post": { + "operationId": "deliverMessage", + "tags": [ + "Message" + ], + "summary": "Correlate", + "description": "Correlates a message to the process engine to either trigger a message start event or an intermediate message \ncatching event. Internally this maps to the engine\u0027s message correlation builder methods\n`MessageCorrelationBuilder#correlateWithResult()` and `MessageCorrelationBuilder#correlateAllWithResult()`.\nFor more information about the correlation behavior, see the [Message Events](https://docs.camunda.org/manual/7.22/bpmn20/events/message-events/)\nsection of the [BPMN 2.0 Implementation Reference](https://docs.camunda.org/manual/7.22/reference/bpmn20/).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CorrelationMessageDto" + }, + "examples": { + "example-1": { + "summary": "POST /message", + "description": "Correlate without result", + "value": { + "messageName": "aMessage", + "businessKey": "aBusinessKey", + "correlationKeys": { + "aVariable": { + "value": "aValue", + "type": "String" + } + }, + "processVariables": { + "aVariable": { + "value": "aNewValue", + "type": "String", + "valueInfo": { + "transient": true + } + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + } + } + }, + "example-2": { + "summary": "POST /message", + "description": "Correlate with result", + "value": { + "messageName": "aMessage", + "businessKey": "aBusinessKey", + "correlationKeys": { + "aVariable": { + "value": "aValue", + "type": "String" + } + }, + "processVariables": { + "aVariable": { + "value": "aNewValue", + "type": "String", + "valueInfo": { + "transient": true + } + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "resultEnabled": true + } + }, + "example-3": { + "summary": "POST /message", + "description": "Correlate with result and variables", + "value": { + "messageName": "aMessage", + "businessKey": "aBusinessKey", + "correlationKeys": { + "aVariable": { + "value": "aValue", + "type": "String" + } + }, + "processVariables": { + "aVariable": { + "value": "aNewValue", + "type": "String", + "valueInfo": { + "transient": true + } + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "resultEnabled": true, + "variablesInResultEnabled": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageCorrelationResultWithVariableDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response.", + "description": "The Response content of a status 200. The property `variablesInResultEnabled` in the request body was `false` (Default).", + "value": [ + { + "resultType": "ProcessDefinition", + "execution": null, + "processInstance": { + "links": [], + "id": "aProcInstId", + "definitionId": "aProcDefId", + "businessKey": "aKey", + "caseInstanceId": "aCaseInstId", + "ended": false, + "suspended": false, + "tenantId": "aTenantId" + } + } + ] + }, + "example-2": { + "summary": "Status 200 Response.", + "description": "The Response content of a status 200. The property `variablesInResultEnabled` in the request body was `true`.", + "value": [ + { + "resultType": "Execution", + "execution": { + "id": "anExecutionId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": "aTenantId" + }, + "processInstance": null, + "variables": { + "aVariable": { + "value": "aNewValue", + "type": "String", + "valueInfo": { + "transient": true + } + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + } + } + ] + } + } + } + }, + "description": "Request successful. The property `resultEnabled` in the request body was `true`.\nThe `variables` property is only returned, if the property variablesInResultEnable`\nwas set to `true` in the request." + }, + "204": { + "description": "Request successful. The property `resultEnabled` in the request body was `false` (Default)." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if:\n* no `messageName` was supplied\n* both `tenantId` and `withoutTenantId` are supplied\n* the message has not been correlated to exactly one entity (execution or process definition)\n* the variable value or type is invalid, for example if the value could not be parsed to an Integer value or the passed variable type is not supported.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/metrics": { + "get": { + "operationId": "interval", + "tags": [ + "Metrics" + ], + "summary": "Get Metrics in Interval", + "description": "Retrieves a list of metrics, aggregated for a given interval.", + "parameters": [ + { + "name": "name", + "in": "query", + "schema": { + "enum": [ + "activity-instance-start", + "activity-instance-end", + "decision-instances", + "flow-node-instances", + "job-acquisition-attempt", + "job-acquired-success", + "job-acquired-failure", + "job-execution-rejected", + "job-successful", + "job-failed", + "job-locked-exclusive", + "executed-decision-elements", + "history-cleanup-removed-process-instances", + "history-cleanup-removed-case-instances", + "history-cleanup-removed-decision-instances", + "history-cleanup-removed-batch-operations", + "history-cleanup-removed-task-metrics", + "process-instances" + ], + "type": "string" + }, + "description": "The name of the metric." + }, + { + "name": "reporter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The name of the reporter (host), on which the metrics was logged. This will have\nvalue provided by the [hostname configuration property](https://docs.camunda.org/manual/7.22/reference/deployment-descriptors/tags/process-engine/#hostname)." + }, + { + "name": "startDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "The start date (inclusive)." + }, + { + "name": "endDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "The end date (exclusive)." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "interval", + "in": "query", + "schema": { + "default": 900, + "type": "string" + }, + "description": "The interval for which the metrics should be aggregated. Time unit is seconds.\nDefault: The interval is set to 15 minutes (900 seconds)." + }, + { + "name": "aggregateByReporter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Aggregate metrics by reporter." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricsIntervalResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /metrics?name\u003dflow-node-instances\u0026startDate\u003d1970-01-01T01:45:00.000%2b0200\u0026endDate\u003d1970-01-01T02:00:00.000%2b0200", + "value": [ + { + "timestamp": "1970-01-01T01:45:00.000+0200", + "name": "flow-node-instances", + "reporter": "REPORTER", + "value": 23 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid." + } + } + } + }, + "/metrics/task-worker": { + "delete": { + "operationId": "deleteTaskMetrics", + "tags": [ + "Metrics" + ], + "summary": "Delete Task Worker Metrics", + "description": "Deletes all task worker metrics prior to the given date or all if no date is provided.", + "parameters": [ + { + "name": "date", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "The date prior to which all task worker metrics should be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the user who performs the operation is not a \u003cb\u003ecamunda-admin\u003c/b\u003e user." + } + } + } + }, + "/metrics/{metrics-name}/sum": { + "get": { + "operationId": "getMetrics", + "tags": [ + "Metrics" + ], + "summary": "Get Sum", + "description": "Retrieves the `sum` (count) for a given metric.", + "parameters": [ + { + "name": "metrics-name", + "in": "path", + "schema": { + "enum": [ + "activity-instance-start", + "activity-instance-end", + "decision-instances", + "flow-node-instances", + "job-acquisition-attempt", + "job-acquired-success", + "job-acquired-failure", + "job-execution-rejected", + "job-successful", + "job-failed", + "job-locked-exclusive", + "executed-decision-elements", + "history-cleanup-removed-process-instances", + "history-cleanup-removed-case-instances", + "history-cleanup-removed-decision-instances", + "history-cleanup-removed-batch-operations", + "history-cleanup-removed-task-metrics", + "unique-task-workers", + "process-instances", + "task-users" + ], + "type": "string" + }, + "required": true, + "description": "The name of the metric." + }, + { + "name": "startDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "The start date (inclusive)." + }, + { + "name": "endDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "The end date (exclusive)." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetricsResultDto" + }, + "examples": { + "example-1": { + "summary": "GET /metrics/activity-instance-end/sum?startDate\u003d2015-01-01T00:00:00.000%2b0200", + "value": { + "result": 4342343241 + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/migration/execute": { + "post": { + "operationId": "executeMigrationPlan", + "tags": [ + "Migration" + ], + "summary": "Execute Migration Plan", + "description": "Executes a migration plan synchronously for multiple process instances. To execute\na migration plan asynchronously, use the\n[Execute Migration Plan Async(Batch)](https://docs.camunda.org/manual/7.22/reference/rest/migration/execute-migration-async/)\nmethod.\n\nFor more information about the difference between synchronous and asynchronous\nexecution of a migration plan, please refer to the related section of\n[the user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-migration/#executing-a-migration-plan).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationExecutionDto" + }, + "examples": { + "example-1": { + "summary": "POST `/migration/execute`", + "value": { + "migrationPlan": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ] + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "[5,9]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + }, + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId1" + }, + "skipCustomListeners": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The request is not valid if one or more of the following statements apply:\n\n* The provided migration plan is not valid, so an exception of type\n`MigrationPlanValidationException` is returned.\n* The provided migration plan is not valid for a specific process\ninstance it is applied to, so an exception of type\n`MigratingProcessInstanceValidationException` is returned.\n* In case additional parameters of the request are unexpected, an\nexception of type `InvalidRequestException` is returned.\n\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/migration/executeAsync": { + "post": { + "operationId": "executeMigrationPlanAsync", + "tags": [ + "Migration" + ], + "summary": "Execute Migration Plan Async (Batch)", + "description": "Executes a migration plan asynchronously (batch) for multiple process instances.\nTo execute a migration plan synchronously, use the\n[Execute MigrationPlan](https://docs.camunda.org/manual/7.22/reference/rest/migration/execute-migration/)\nmethod.\n\nFor more information about the difference between synchronous and asynchronous\nexecution of a migration plan, please refer to the related section of\n[the user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-migration/#executing-a-migration-plan).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationExecutionDto" + }, + "examples": { + "example-1": { + "summary": "POST `/migration/executeAsync`", + "value": { + "migrationPlan": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ] + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "[5,9]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + }, + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId1" + }, + "skipCustomListeners": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/migration/executeAsync`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The request is not valid if one or more of the following statements apply:\n\n* The provided migration plan is not valid, so an exception of type\n`MigrationPlanValidationException` is returned.\n* In case additional parameters of the request are unexpected, an\nexception of type `InvalidRequestException` is returned.\n\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/migration/generate": { + "post": { + "operationId": "generateMigrationPlan", + "tags": [ + "Migration" + ], + "summary": "Generate Migration Plan", + "description": "Generates a migration plan for two process definitions. The generated migration\nplan contains migration instructions which map equal activities\nbetween the\ntwo process definitions.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationPlanGenerationDto" + }, + "examples": { + "example-1": { + "summary": "POST `/migration/generate`", + "value": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "updateEventTriggers": true, + "variables": { + "foo": { + "type": "Object", + "value": "[5,6]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationPlanDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/migration/generate`", + "value": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ], + "updateEventTrigger": false + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "[5,6]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe requested migration was invalid. See\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/migration/validate": { + "post": { + "operationId": "validateMigrationPlan", + "tags": [ + "Migration" + ], + "summary": "Validate Migration Plan", + "description": "Validates a migration plan statically without executing it. This\ncorresponds to the\n[creation time validation](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-migration/#creation-time-validation)\ndescribed in the user guide.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationPlanDto" + }, + "examples": { + "example-1": { + "summary": "POST `/migration/validate`", + "value": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ] + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "...", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/x-java-serialized-object" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationPlanReportDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/migration/validate`", + "value": { + "instructionReports": [ + { + "instruction": { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ], + "updateEventTrigger": false + }, + "failures": [ + "failure1", + "failure2" + ] + }, + { + "instruction": { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + }, + "failures": [ + "failure1", + "failure2" + ] + } + ], + "variableReports": { + "foo": { + "type": "Object", + "value": "...", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/x-java-serialized-object" + }, + "failures": [ + "Cannot set variable with name foo. Java serialization format is prohibited" + ] + } + } + } + } + } + } + }, + "description": "Request successful. The validation report was returned." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case additional parameters of the request are unexpected, an\nexception of type `InvalidRequestException` is returned. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/modification/execute": { + "post": { + "operationId": "executeModification", + "tags": [ + "Modification" + ], + "summary": "Execute Modification", + "description": "Executes a modification synchronously for multiple process instances.\nTo modify a single process instance, use the\n[Modify Process Instance Execution State](https://docs.camunda.org/manual/7.22/reference/rest/process-instance/post-modification/) method.\nTo execute a modification asynchronously, use the\n[Execute Modification Async (Batch)](https://docs.camunda.org/manual/7.22/reference/rest/modification/post-modification-async/) method.\n\nFor more information about the difference between synchronous and\nasynchronous execution of a modification, please refer to the related\nsection of the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-migration.md#executing-a-migration-plan).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationDto" + }, + "examples": { + "example-1": { + "summary": "POST `/modification/execute`", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + }, + { + "type": "cancel", + "activityId": "anotherTask", + "cancelCurrentActiveActivityInstances": true + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId" + }, + "skipCustomListeners": true, + "annotation": "Modified to resolve an error." + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nIn case following parameters are missing: instructions,\nprocessDefinitionId, activityId or transitionId, processInstanceIds\nor processInstanceQuery, an exception of type\n`InvalidRequestException` is returned. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/modification/executeAsync": { + "post": { + "operationId": "executeModificationAsync", + "tags": [ + "Modification" + ], + "summary": "Execute Modification Async (Batch)", + "description": "Executes a modification asynchronously for multiple process instances. To execute a\nmodification synchronously, use the\n[Execute Modification](https://docs.camunda.org/manual/7.22/reference/rest/modification/post-modification-sync/) method.\n\nFor more information about the difference between synchronous and\nasynchronous execution of a modification, please refer to the related\nsection of the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-migration.md#executing-a-migration-plan).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationDto" + }, + "examples": { + "example-1": { + "summary": "POST `/modification/executeAsync`", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + }, + { + "type": "cancel", + "activityId": "anotherTask", + "cancelCurrentActiveActivityInstances": true + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId" + }, + "skipCustomListeners": true, + "annotation": "Modified to resolve an error." + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/modification/executeAsync`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nIn case following parameters are missing: instructions,\nprocessDefinitionId, activityId or transitionId, processInstanceIds\nor processInstanceQuery, an exception of type\n`InvalidRequestException` is returned. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/process-definition": { + "get": { + "operationId": "getProcessDefinitions", + "tags": [ + "Process Definition" + ], + "summary": "Get List", + "description": "Queries for process definitions that fulfill given parameters. Parameters may be the properties of \nprocess definitions, such as the name, key or version. The size of the result set can be retrieved\nby using the [Get Definition Count](https://docs.camunda.org/manual/7.22/reference/rest/process-definition/get-query-count/) method.", + "parameters": [ + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "deployedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the process definition belongs to.\nOnly selects process definitions that have been deployed after (exclusive) a specific time.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "deployedAt", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the process definition belongs to.\nOnly selects process definitions that have been deployed at a specific time (exact match).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key, i.e., the id in the BPMN 2.0 XML. Exact match." + }, + { + "name": "keysIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition keys." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition categories that the parameter is a substring of." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by process definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those process definitions that are latest versions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the process definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those process definition resources that the parameter is a substring of." + }, + { + "name": "startableBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a user name who is allowed to start the process." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active process definitions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended process definitions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nA process definition must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions which belong to no tenant.\nValue may only be true, as false is the default behavior." + }, + { + "name": "includeProcessDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include process definitions which belong to no tenant. Can be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "versionTag", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag." + }, + { + "name": "versionTagLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag that the parameter is a substring of." + }, + { + "name": "withoutVersionTag", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions without a `versionTag`." + }, + { + "name": "startableInTasklist", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which are startable in Tasklist.." + }, + { + "name": "notStartableInTasklist", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which are not startable in Tasklist." + }, + { + "name": "startablePermissionCheck", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which the user is allowed to start in Tasklist.\nIf the user doesn\u0027t have these permissions the result will be empty list.\nThe permissions are:\n* `CREATE` permission for all Process instances\n* `CREATE_INSTANCE` and `READ` permission on Process definition level" + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "category", + "key", + "id", + "name", + "version", + "deploymentId", + "deployTime", + "tenantId ", + "versionTag" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition?keyLike\u003dinvoice\u0026sortBy\u003dversion\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + }, + { + "id": "invoice:2:c3e1bd16-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 2, + "resource": "invoice.v2.bpmn", + "deploymentId": "c3d82020-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "startableInTasklist": true + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/count": { + "get": { + "operationId": "getProcessDefinitionsCount", + "tags": [ + "Process Definition" + ], + "summary": "Get List Count", + "description": "Requests the number of process definitions that fulfill the query criteria.\nTakes the same filtering parameters as the [Get Definitions](https://docs.camunda.org/manual/7.22/reference/rest/process-definition/get-query/) method.", + "parameters": [ + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "deployedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the process definition belongs to.\nOnly selects process definitions that have been deployed after (exclusive) a specific time.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "deployedAt", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the process definition belongs to.\nOnly selects process definitions that have been deployed at a specific time (exact match).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key, i.e., the id in the BPMN 2.0 XML. Exact match." + }, + { + "name": "keysIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition keys." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition categories that the parameter is a substring of." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by process definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those process definitions that are latest versions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the process definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those process definition resources that the parameter is a substring of." + }, + { + "name": "startableBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a user name who is allowed to start the process." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active process definitions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended process definitions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nA process definition must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions which belong to no tenant.\nValue may only be true, as false is the default behavior." + }, + { + "name": "includeProcessDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include process definitions which belong to no tenant. Can be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "versionTag", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag." + }, + { + "name": "versionTagLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag that the parameter is a substring of." + }, + { + "name": "withoutVersionTag", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions without a `versionTag`." + }, + { + "name": "startableInTasklist", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which are startable in Tasklist.." + }, + { + "name": "notStartableInTasklist", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which are not startable in Tasklist." + }, + { + "name": "startablePermissionCheck", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which the user is allowed to start in Tasklist.\nIf the user doesn\u0027t have these permissions the result will be empty list.\nThe permissions are:\n* `CREATE` permission for all Process instances\n* `CREATE_INSTANCE` and `READ` permission on Process definition level" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/count?keyLike\u003dKey\u0026version\u003d47`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}": { + "delete": { + "operationId": "deleteProcessDefinitionsByKey", + "tags": [ + "Process Definition" + ], + "summary": "Delete By Key", + "description": "Deletes process definitions by a given key which belong to no tenant id.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definitions to be deleted." + }, + { + "name": "cascade", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "`true`, if all process instances, historic process instances and jobs\nfor this process definition should be deleted." + }, + { + "name": "skipCustomListeners", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if only the built-in ExecutionListeners should be notified with the end event." + }, + { + "name": "skipIoMappings", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "A boolean value to control whether input/output mappings should be executed during deletion.\n`true`, if input/output mappings should not be invoked." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Forbidden\nThe process definitions with the given `key` cannot be deleted due to missing permissions.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nProcess definition with given `key` does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getProcessDefinitionByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get", + "description": "Retrieves the latest version of the process definition which belongs to no tenant according to the `ProcessDefinition` interface in the engine.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/key/invoice`", + "value": { + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given `key` does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/deployed-start-form": { + "get": { + "operationId": "getDeployedStartFormByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Deployed Start Form", + "description": "Retrieves the deployed form that can be referenced from a start event.\nFor further information please refer to [User Guide](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#embedded-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET `/process-definition/key/processDefinitionKey/deployed-start-form`", + "value": "\u003cform role\u003d\"form\" name\u003d\"invoiceForm\"\n class\u003d\"form-horizontal\"\u003e\n\n \u003cdiv class\u003d\"form-group\"\u003e\n \u003clabel class\u003d\"control-label col-md-4\"\n for\u003d\"creditor\"\u003eCreditor\u003c/label\u003e\n \u003cdiv class\u003d\"col-md-8\"\u003e\n \u003cinput cam-variable-name\u003d\"creditor\"\n cam-variable-type\u003d\"String\"\n id\u003d\"creditor\"\n class\u003d\"form-control\"\n type\u003d\"text\"\n required /\u003e\n \u003cdiv class\u003d\"help\"\u003e\n (e.g. \u0026quot;Great Pizza for Everyone Inc.\u0026quot;)\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The form key has wrong format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The deployed start form cannot be retrieved due to missing permissions on process definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No deployed start form for a given process definition exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/diagram": { + "get": { + "operationId": "getProcessDefinitionDiagramByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Diagram", + "description": "Retrieves the diagram for the latest version of the process definition which belongs to no tenant.\n\nIf the process definition\u0027s deployment contains an image resource with the same file name\nas the process definition, the deployed image will be returned by the Get Diagram endpoint.\nExample: `someProcess.bpmn` and `someProcess.png`.\nSupported file extentions for the image are: `svg`, `png`, `jpg`, and `gif`.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The process definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/form-variables": { + "get": { + "operationId": "getStartFormVariablesByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Variables", + "description": "Retrieves the start form variables for the latest process definition which belongs to no tenant\n(only if they are defined via the \n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms) approach).\nThe start form variables take form data specified on the start event into account.\nIf form fields are defined, the variable types and default values\nof the form fields are taken into account.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "variableNames", + "in": "query", + "schema": { + "type": "string" + }, + "description": "A comma-separated list of variable names. Allows restricting the list of requested\nvariables to the variable names in the list. It is best practice to restrict the\nlist of variables to the variables actually required by the form in order to\nminimize fetching of data. If the query parameter is ommitted all variables are\nfetched. If the query parameter contains non-existent variable names, the variable\nnames are ignored." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store\ncustom Java objects) should be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and\ntransformed to JSON using [Jackson\u0027s](http://jackson.codehaus.org/) POJO/bean\nproperty introspection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string\ncontaining XML.\n\n**Note**: While true is the default value for reasons of backward compatibility, we\nrecommend setting this parameter to false when developing web applications that are\nindependent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `/process-definition/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + } + } + } + } + }, + "description": "Request successful. A JSON object containing a property for each variable returned." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The key is null or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByProcessDefinitionKey", + "tags": [ + "Process Definition" + ], + "summary": "Update History Time to Live", + "description": "Updates history time to live for the latest version of the process definition which belongs to no tenant.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).\nThe value of the update is mandatory by default and does not allow `null` values. To enable them, please\nset the feature flag `enforceHistoryTimeToLive` to `false`. Read more in [Configuration Properties]\n(https://docs.camunda.org/manual/7.22/reference/deployment-descriptors/tags/process-engine#configuration-properties)", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition to change history time to live." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/rendered-form": { + "get": { + "operationId": "getRenderedStartFormByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Rendered Start Form", + "description": "Retrieves the rendered form for the latest version of the process definition which belongs to no tenant.\nThis method can be used to get the HTML rendering of a\n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "A `/process-definition/key/anKey/rendered-form` HTML\n GET response body providing the rendered (generated) form content.", + "value": "\u003cform class\u003d\"form-horizontal\"\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eCustomer ID\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"string\" name\u003d\"customerId\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eAmount\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"number\" name\u003d\"amount\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no form field metadata defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/start": { + "post": { + "operationId": "startProcessInstanceByKey", + "tags": [ + "Process Definition" + ], + "summary": "Start Instance", + "description": "Instantiates a given process definition, starts the latest version of the process definition\nwhich belongs to no tenant.\nProcess variables and business key may be supplied in the request body.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Starting a process instance at its default initial activity", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + }, + "example-2": { + "summary": "Starting a process instance with variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey", + "withVariablesInReturn": true + } + }, + "example-3": { + "summary": "Starting a process instance at two specific activities", + "value": { + "variables": { + "aProcessVariable": { + "value": "aStringValue", + "type": "String" + } + }, + "businessKey": "myBusinessKey", + "skipCustomListeners": true, + "startInstructions": [ + { + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String" + } + } + }, + { + "type": "startAfterActivity", + "activityId": "anotherActivityId", + "variables": { + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceWithVariablesDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "Response for starting a process instance at its default initial activity", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + }, + "example-2": { + "summary": "Status 200 Response 2", + "description": "Response for starting a process instance with variables in return", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/aProcInstId", + "rel": "self" + } + ], + "id": "aProcInstId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": null, + "variables": { + "anotherVariable": { + "type": "Boolean", + "value": true, + "valueInfo": { + "transient": true + } + }, + "aVariable": { + "type": "String", + "value": "aStringValue", + "valueInfo": {} + } + } + } + }, + "example-3": { + "summary": "Status 200 Response 3", + "description": "Response for starting a process instance at two specific activities", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/startForm": { + "get": { + "operationId": "getStartFormByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Key", + "description": "Retrieves the key of the start form for the latest version of the process definition\nwhich belongs to no tenant.\nThe form key corresponds to the `FormData#formKey` property in the engine.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) for which the form key is to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `process-definition/key/aKey/startForm`", + "value": { + "key": "aFormKey", + "contextPath": "http://localhost:8080/my-process-application/" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no start form defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/statistics": { + "get": { + "operationId": "getActivityStatisticsByProcessDefinitionKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Activity Instance Statistics", + "description": "Retrieves runtime statistics of the latest version of the given process definition\nwhich belongs to no tenant, grouped by activities.\nThese statistics include the number of running activity instances, optionally the number of failed jobs\nand also optionally the number of incidents either grouped by incident types or\nfor a specific incident type.\n**Note**: This does not include historic data.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "failedJobs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of failed jobs in the result or not. Valid values are `true` or `false`." + }, + { + "name": "incidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Valid values for this property are `true` or `false`.\nIf this property has been set to `true` the result will include the corresponding number of incidents\nfor each occurred incident type.\nIf it is set to `false`, the incidents will not be included in the result.\nCannot be used in combination with `incidentsForType`." + }, + { + "name": "incidentsForType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "If this property has been set with any incident type (i.e., a string value) the result\nwill only include the number of incidents for the assigned incident type.\nCannot be used in combination with `incidents`.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityStatisticsResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/statistics?failedJobs\u003dtrue", + "description": "Request with Query Parameter `failedJobs\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 42, + "incidents": [] + }, + { + "id": "anotherActivity", + "instances": 124, + "failedJobs": 43, + "incidents": [] + } + ] + }, + "example-2": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/statistics?incidents\u003dtrue", + "description": "Request with Query Parameter `incidents\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 42 + }, + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + }, + { + "id": "anotherActivity", + "instances": 124, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 43 + }, + { + "incidentType": "anIncident", + "incidentCount": 22 + }, + { + "incidentType": "anotherIncident", + "incidentCount": 15 + } + ] + } + ] + }, + "example-3": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/statistics?incidentsForType\u003danIncident", + "description": "Request with Query Parameter `incidentsForType\u003danIncident`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/submit-form": { + "post": { + "operationId": "submitFormByKey", + "tags": [ + "Process Definition" + ], + "summary": "Submit Start Form", + "description": "Starts the latest version of the process definition which belongs to no tenant\nusing a set of process variables and the business key.\nIf the start event has Form Field Metadata defined, the process engine will perform backend validation\nfor any form fields which have validators defined.\nSee [Documentation on Generated Task Forms](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition to submit the form for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceFormDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-definition/key/aProcessDefinitionKey/submit-form`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "POST `/process-definition/key/aProcessDefinitionKey/submit-form`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/suspended": { + "put": { + "operationId": "updateProcessDefinitionSuspensionStateByKey", + "tags": [ + "Process Definition" + ], + "summary": "Activate/Suspend by Id", + "description": "Activates or suspends a given process definition by latest version of process definition key\nwhich belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be activated/suspended." + } + ], + "requestBody": { + "description": "**Note**: Unallowed properties are `processDefinitionId` and `processDefinitionKey`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/suspended`", + "value": { + "suspended": true, + "includeProcessInstances": true, + "executionDate": "2013-11-21T10:49:45T14:42:45" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if the provided `executionDate` parameter doesn\u0027t have the expected format or\nif the `processDefinitionKey` parameter is `null`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}": { + "delete": { + "operationId": "deleteProcessDefinitionsByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Delete By Key", + "description": "Deletes process definitions by a given key and which belong to a tenant id.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definitions to be deleted." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definitions belong to." + }, + { + "name": "cascade", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "`true`, if all process instances, historic process instances and jobs\nfor this process definition should be deleted." + }, + { + "name": "skipCustomListeners", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if only the built-in ExecutionListeners should be notified with the end event." + }, + { + "name": "skipIoMappings", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "A boolean value to control whether input/output mappings should be executed during deletion.\n`true`, if input/output mappings should not be invoked." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Forbidden\nThe process definitions with the given `key` cannot be deleted due to missing permissions.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nProcess definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getLatestProcessDefinitionByTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get", + "description": "Retrieves the latest version of the process definition for tenant according to\nthe `ProcessDefinition` interface in the engine.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/key/invoice/tenant-id/tenantOne`", + "value": { + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": "tenantOne", + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given `key` does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/deployed-start-form": { + "get": { + "operationId": "getDeployedStartFormByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Deployed Start Form", + "description": "Retrieves the deployed form that can be referenced from a start event.\nFor further information please refer to [User Guide](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#embedded-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definitions belong to." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET\n `/process-definition/key/processDefinitionKey/tenant-id/tenantId/deployed-start-form`", + "value": "\u003cform role\u003d\"form\" name\u003d\"invoiceForm\"\n class\u003d\"form-horizontal\"\u003e\n\n \u003cdiv class\u003d\"form-group\"\u003e\n \u003clabel class\u003d\"control-label col-md-4\"\n for\u003d\"creditor\"\u003eCreditor\u003c/label\u003e\n \u003cdiv class\u003d\"col-md-8\"\u003e\n \u003cinput cam-variable-name\u003d\"creditor\"\n cam-variable-type\u003d\"String\"\n id\u003d\"creditor\"\n class\u003d\"form-control\"\n type\u003d\"text\"\n required /\u003e\n \u003cdiv class\u003d\"help\"\u003e\n (e.g. \u0026quot;Great Pizza for Everyone Inc.\u0026quot;)\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The form key has wrong format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The deployed start form cannot be retrieved due to missing permissions on process definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No deployed start form for a given process definition exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/diagram": { + "get": { + "operationId": "getProcessDefinitionDiagramByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Diagram", + "description": "Retrieves the diagram for the latest version of the process definition for tenant.\n\nIf the process definition\u0027s deployment contains an image resource with the same file name\nas the process definition, the deployed image will be returned by the Get Diagram endpoint.\nExample: `someProcess.bpmn` and `someProcess.png`.\nSupported file extentions for the image are: `svg`, `png`, `jpg`, and `gif`.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The process definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/form-variables": { + "get": { + "operationId": "getStartFormVariablesByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Variables", + "description": "Retrieves the start form variables for the latest process definition for a tenant\n(only if they are defined via the \n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms) approach).\nThe start form variables take form data specified on the start event into account.\nIf form fields are defined, the variable types and default values\nof the form fields are taken into account.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + }, + { + "name": "variableNames", + "in": "query", + "schema": { + "type": "string" + }, + "description": "A comma-separated list of variable names. Allows restricting the list of requested\nvariables to the variable names in the list. It is best practice to restrict the\nlist of variables to the variables actually required by the form in order to\nminimize fetching of data. If the query parameter is ommitted all variables are\nfetched. If the query parameter contains non-existent variable names, the variable\nnames are ignored." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store\ncustom Java objects) should be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and\ntransformed to JSON using [Jackson\u0027s](http://jackson.codehaus.org/) POJO/bean\nproperty introspection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string\ncontaining XML.\n\n**Note**: While true is the default value for reasons of backward compatibility, we\nrecommend setting this parameter to false when developing web applications that are\nindependent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `/process-definition/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + } + } + } + } + }, + "description": "Request successful. A JSON object containing a property for each variable returned." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The key is null or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByProcessDefinitionKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Update History Time to Live", + "description": "Updates history time to live for the latest version of the process definition for a tenant.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition to change history time to live." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/rendered-form": { + "get": { + "operationId": "getRenderedStartFormByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Rendered Start Form", + "description": "Retrieves the rendered form for the latest version of the process definition for a tenant.\nThis method can be used to get the HTML rendering of a\n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "A `/process-definition/key/anKey/tenand-id/aTenantId/rendered-form` HTML\n GET response body providing the rendered (generated) form content.", + "value": "\u003cform class\u003d\"form-horizontal\"\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eCustomer ID\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"string\" name\u003d\"customerId\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eAmount\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"number\" name\u003d\"amount\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no form field metadata defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/start": { + "post": { + "operationId": "startProcessInstanceByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Start Instance", + "description": "Instantiates a given process definition, starts the latest version of the process definition for tenant.\nProcess variables and business key may be supplied in the request body.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Starting a process instance at its default initial activity", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + }, + "example-2": { + "summary": "Starting a process instance with variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey", + "withVariablesInReturn": true + } + }, + "example-3": { + "summary": "Starting a process instance at two specific activities", + "value": { + "variables": { + "aProcessVariable": { + "value": "aStringValue", + "type": "String" + } + }, + "businessKey": "myBusinessKey", + "skipCustomListeners": true, + "startInstructions": [ + { + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String" + } + } + }, + { + "type": "startAfterActivity", + "activityId": "anotherActivityId", + "variables": { + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceWithVariablesDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "Response for starting a process instance at its default initial activity", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + }, + "example-2": { + "summary": "Status 200 Response 2", + "description": "Response for starting a process instance with variables in return", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/aProcInstId", + "rel": "self" + } + ], + "id": "aProcInstId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": null, + "variables": { + "anotherVariable": { + "type": "Boolean", + "value": true, + "valueInfo": { + "transient": true + } + }, + "aVariable": { + "type": "String", + "value": "aStringValue", + "valueInfo": {} + } + } + } + }, + "example-3": { + "summary": "Status 200 Response 3", + "description": "Response for starting a process instance at two specific activities", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/startForm": { + "get": { + "operationId": "getStartFormByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Key", + "description": "Retrieves the key of the start form for the latest version of the process definition for a tenant.\nThe form key corresponds to the `FormData#formKey` property in the engine.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) for which the form key is to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `process-definition/key/aKey/tenant-id/aTenantId/startForm`", + "value": { + "key": "aFormKey", + "contextPath": "http://localhost:8080/my-process-application/" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no start form defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/statistics": { + "get": { + "operationId": "getActivityStatisticsByProcessDefinitionKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Activity Instance Statistics", + "description": "Retrieves runtime statistics of the latest version of the given process definition for a tenant,\ngrouped by activities.\nThese statistics include the number of running activity instances, optionally the number of failed jobs\nand also optionally the number of incidents either grouped by incident types or\nfor a specific incident type.\n**Note**: This does not include historic data.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + }, + { + "name": "failedJobs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of failed jobs in the result or not. Valid values are `true` or `false`." + }, + { + "name": "incidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Valid values for this property are `true` or `false`.\nIf this property has been set to `true` the result will include the corresponding number of incidents\nfor each occurred incident type.\nIf it is set to `false`, the incidents will not be included in the result.\nCannot be used in combination with `incidentsForType`." + }, + { + "name": "incidentsForType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "If this property has been set with any incident type (i.e., a string value) the result\nwill only include the number of incidents for the assigned incident type.\nCannot be used in combination with `incidents`.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityStatisticsResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/statistics?failedJobs\u003dtrue", + "description": "Request with Query Parameter `failedJobs\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 42, + "incidents": [] + }, + { + "id": "anotherActivity", + "instances": 124, + "failedJobs": 43, + "incidents": [] + } + ] + }, + "example-2": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/statistics?incidents\u003dtrue", + "description": "Request with Query Parameter `incidents\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 42 + }, + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + }, + { + "id": "anotherActivity", + "instances": 124, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 43 + }, + { + "incidentType": "anIncident", + "incidentCount": 22 + }, + { + "incidentType": "anotherIncident", + "incidentCount": 15 + } + ] + } + ] + }, + "example-3": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/statistics?incidentsForType\u003danIncident", + "description": "Request with Query Parameter `incidentsForType\u003danIncident`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/submit-form": { + "post": { + "operationId": "submitFormByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Submit Start Form", + "description": "Starts the latest version of the process definition for a tenant\nusing a set of process variables and the business key.\nIf the start event has Form Field Metadata defined, the process engine will perform backend validation\nfor any form fields which have validators defined.\nSee [Documentation on Generated Task Forms](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition to submit the form for." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceFormDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/submit-form`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "POST `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/submit-form`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/suspended": { + "put": { + "operationId": "updateProcessDefinitionSuspensionStateByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Activate/Suspend by Id", + "description": "Activates or suspends a given process definition by the latest version of\nthe process definition for tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be activated/suspended." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "requestBody": { + "description": "**Note**: Unallowed properties are `processDefinitionId` and `processDefinitionKey`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/suspended`", + "value": { + "suspended": true, + "includeProcessInstances": true, + "executionDate": "2013-11-21T10:49:45T14:42:45" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if the provided `executionDate` parameter doesn\u0027t have the expected format or\nif the `processDefinitionKey` parameter is `null`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/xml": { + "get": { + "operationId": "getProcessDefinitionBpmn20XmlByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get XML", + "description": "Retrieves latest version the BPMN 2.0 XML of a process definition.\nReturns the XML for the latest version of the process definition for tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) whose XML should be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/xml`", + "value": { + "id": "anProcessDefinitionId", + "bpmn20Xml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n\u003cdefinitions\n xmlns\u003d\"http://www.omg.org/spec/BPMN/20100524/MODEL\"\n xmlns:camunda\u003d\"http://camunda.org/schema/1.0/bpmn\"\n targetNamespace\u003d\"Examples\"\u003e\n \u003cprocess id\u003d\"oneTaskProcess\" isExecutable\u003d\"true\"\u003e\n \u003cstartEvent id\u003d\"theStart\" /\u003e\n \u003csequenceFlow id\u003d\"flow1\" sourceRef\u003d\"theStart\" targetRef\u003d\"theEnd\" /\u003e\n \u003cendEvent id\u003d\"theEnd\" /\u003e\n \u003c/process\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The Process Definition xml cannot be retrieved due to missing permissions on the Process Definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/xml": { + "get": { + "operationId": "getProcessDefinitionBpmn20XmlByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get XML", + "description": "Retrieves latest version the BPMN 2.0 XML of a process definition.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) whose XML should be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-definition/key/aProcessDefinitionKey/xml`", + "value": { + "id": "anProcessDefinitionId", + "bpmn20Xml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n\u003cdefinitions\n xmlns\u003d\"http://www.omg.org/spec/BPMN/20100524/MODEL\"\n xmlns:camunda\u003d\"http://camunda.org/schema/1.0/bpmn\"\n targetNamespace\u003d\"Examples\"\u003e\n \u003cprocess id\u003d\"oneTaskProcess\" isExecutable\u003d\"true\"\u003e\n \u003cstartEvent id\u003d\"theStart\" /\u003e\n \u003csequenceFlow id\u003d\"flow1\" sourceRef\u003d\"theStart\" targetRef\u003d\"theEnd\" /\u003e\n \u003cendEvent id\u003d\"theEnd\" /\u003e\n \u003c/process\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The Process Definition xml cannot be retrieved due to missing permissions on the Process Definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/statistics": { + "get": { + "operationId": "getProcessDefinitionStatistics", + "tags": [ + "Process Definition" + ], + "summary": "Get Process Instance Statistics", + "description": "Retrieves runtime statistics of the process engine, grouped by process definitions.\nThese statistics include the number of running process instances, optionally the number of failed jobs\nand also optionally the number of incidents either grouped by incident types or\nfor a specific incident type.\n**Note**: This does not include historic data.", + "parameters": [ + { + "name": "failedJobs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of failed jobs in the result or not. Valid values are `true` or `false`." + }, + { + "name": "incidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Valid values for this property are `true` or `false`.\nIf this property has been set to `true` the result will include the corresponding number of incidents\nfor each occurred incident type.\nIf it is set to `false`, the incidents will not be included in the result.\nCannot be used in combination with `incidentsForType`." + }, + { + "name": "incidentsForType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "If this property has been set with any incident type (i.e., a string value) the result\nwill only include the number of incidents for the assigned incident type.\nCannot be used in combination with `incidents`.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "rootIncidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Valid values for this property are `true` or `false`.\nIf this property has been set to `true` the result will include the corresponding number of\nroot incidents for each occurred incident type.\nIf it is set to `false`, the incidents will not be included in the result.\nCannot be used in combination with `incidentsForType` or `incidents`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessDefinitionStatisticsResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /process-definition/statistics?failedJobs\u003dtrue", + "description": "Request with Query Parameter `failedJobs\u003dtrue`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId", + "instances": 123, + "failedJobs": 42, + "definition": { + "id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [] + }, + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId:2", + "instances": 124, + "failedJobs": 43, + "definition": { + "id": "aProcessDefinitionId:2", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [] + } + ] + }, + "example-2": { + "summary": "GET /process-definition/statistics?incidents\u003dtrue", + "description": "Request with Query Parameter `incidents\u003dtrue`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId", + "instances": 123, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 42 + }, + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + }, + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId:2", + "instances": 124, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId:2", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 43 + }, + { + "incidentType": "anIncident", + "incidentCount": 22 + }, + { + "incidentType": "anotherIncident", + "incidentCount": 15 + } + ] + } + ] + }, + "example-3": { + "summary": "GET /process-definition/statistics?incidentsForType\u003danIncident", + "description": "Request with Query Parameter `incidentsForType\u003danIncident`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId", + "instances": 123, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [ + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + } + ] + }, + "example-4": { + "summary": "GET /process-definition/statistics?rootIncidents\u003dtrue", + "description": "Request with Query Parameter `rootIncidents\u003dtrue`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId", + "instances": 123, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 62 + }, + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/suspended": { + "put": { + "operationId": "updateProcessDefinitionSuspensionState", + "tags": [ + "Process Definition" + ], + "summary": "Activate/Suspend By Key", + "description": "Activates or suspends process definitions with the given process definition key.", + "requestBody": { + "description": "**Note**: Unallowed property is `processDefinitionId`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/suspended`", + "value": { + "processDefinitionKey": "aProcessDefinitionKey", + "suspended": true, + "includeProcessInstances": true, + "executionDate": "2013-11-21T10:49:45T14:42:45" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if the provided `executionDate` parameter doesn\u0027t have the expected format or\nif the `processDefinitionKey` parameter is `null`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}": { + "delete": { + "operationId": "deleteProcessDefinition", + "tags": [ + "Process Definition" + ], + "summary": "Delete", + "description": "Deletes a running process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to be deleted." + }, + { + "name": "cascade", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "`true`, if all process instances, historic process instances and jobs\nfor this process definition should be deleted." + }, + { + "name": "skipCustomListeners", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if only the built-in ExecutionListeners should be notified with the end event." + }, + { + "name": "skipIoMappings", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "A boolean value to control whether input/output mappings should be executed during deletion.\n`true`, if input/output mappings should not be invoked." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nProcess definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getProcessDefinition", + "tags": [ + "Process Definition" + ], + "summary": "Get", + "description": "Retrieves a process definition according to the `ProcessDefinition` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e`", + "value": { + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given `id` does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/deployed-start-form": { + "get": { + "operationId": "getDeployedStartForm", + "tags": [ + "Process Definition" + ], + "summary": "Get Deployed Start Form", + "description": "Retrieves the deployed form that can be referenced from a start event.\nFor further information please refer to [User Guide](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#embedded-task-forms).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to get the deployed start form for." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET `/process-definition/processDefinitionId/deployed-start-form`", + "value": "\u003cform role\u003d\"form\" name\u003d\"invoiceForm\"\n class\u003d\"form-horizontal\"\u003e\n\n \u003cdiv class\u003d\"form-group\"\u003e\n \u003clabel class\u003d\"control-label col-md-4\"\n for\u003d\"creditor\"\u003eCreditor\u003c/label\u003e\n \u003cdiv class\u003d\"col-md-8\"\u003e\n \u003cinput cam-variable-name\u003d\"creditor\"\n cam-variable-type\u003d\"String\"\n id\u003d\"creditor\"\n class\u003d\"form-control\"\n type\u003d\"text\"\n required /\u003e\n \u003cdiv class\u003d\"help\"\u003e\n (e.g. \u0026quot;Great Pizza for Everyone Inc.\u0026quot;)\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n\n \u003c/form\u003e" + } + } + }, + "application/json": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/json` Responses, a byte stream is returned." + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The form key has wrong format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The deployed start form cannot be retrieved due to missing permissions on process definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No deployed start form for a given process definition exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/diagram": { + "get": { + "operationId": "getProcessDefinitionDiagram", + "tags": [ + "Process Definition" + ], + "summary": "Get Diagram", + "description": "Retrieves the diagram of a process definition.\n\nIf the process definition\u0027s deployment contains an image resource with the same file name\nas the process definition, the deployed image will be returned by the Get Diagram endpoint.\nExample: `someProcess.bpmn` and `someProcess.png`.\nSupported file extentions for the image are: `svg`, `png`, `jpg`, and `gif`.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The process definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/form-variables": { + "get": { + "operationId": "getStartFormVariables", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Variables", + "description": "Retrieves the start form variables for a process definition\n(only if they are defined via the \n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms) approach).\nThe start form variables take form data specified on the start event into account.\nIf form fields are defined, the variable types and default values\nof the form fields are taken into account.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to retrieve the variables for." + }, + { + "name": "variableNames", + "in": "query", + "schema": { + "type": "string" + }, + "description": "A comma-separated list of variable names. Allows restricting the list of requested\nvariables to the variable names in the list. It is best practice to restrict the\nlist of variables to the variables actually required by the form in order to\nminimize fetching of data. If the query parameter is ommitted all variables are\nfetched. If the query parameter contains non-existent variable names, the variable\nnames are ignored." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store\ncustom Java objects) should be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and\ntransformed to JSON using [Jackson\u0027s](http://jackson.codehaus.org/) POJO/bean\nproperty introspection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string\ncontaining XML.\n\n**Note**: While true is the default value for reasons of backward compatibility, we\nrecommend setting this parameter to false when developing web applications that are\nindependent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `/process-definition/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + } + } + } + } + }, + "description": "Request successful. A JSON object containing a property for each variable returned." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The id is null or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByProcessDefinitionId", + "tags": [ + "Process Definition" + ], + "summary": "Update History Time to Live", + "description": "Updates history time to live for process definition.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).\nThe value of the update is mandatory by default and does not allow `null` values. To enable them, please\nset the feature flag `enforceHistoryTimeToLive` to `false`. Read more in [Configuration Properties]\n(https://docs.camunda.org/manual/7.22/reference/deployment-descriptors/tags/process-engine#configuration-properties)", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to change history time to live." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/aProcessDefinitionId/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/rendered-form": { + "get": { + "operationId": "getRenderedStartForm", + "tags": [ + "Process Definition" + ], + "summary": "Get Rendered Start Form", + "description": "Retrieves the rendered form for a process definition.\nThis method can be used to get the HTML rendering of a\n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to get the rendered start form for." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "A `/process-definition/anId/rendered-form` HTML\n GET response body providing the rendered (generated) form content.", + "value": "\u003cform class\u003d\"form-horizontal\"\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eCustomer ID\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"string\" name\u003d\"customerId\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eAmount\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"number\" name\u003d\"amount\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no form field metadata defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/restart": { + "post": { + "operationId": "restartProcessInstance", + "tags": [ + "Process Definition" + ], + "summary": "Restart Process Instance", + "description": "Restarts process instances that were canceled or terminated synchronously.\nCan also restart completed process instances.\nIt will create a new instance using the original instance information.\nTo execute the restart asynchronously, use the\n[Restart Process Instance Async](https://docs.camunda.org/manual/7.22/reference/rest/process-definition/post-restart-process-instance-async/) method.\n\nFor more information about the difference between synchronous and asynchronous execution,\nplease refer to the related section of the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-restart/#execution).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition of the process instances to restart." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestartProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Restarting one or more Process Instances with known processInstanceIds", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "initialVariables": true, + "skipCustomListeners": true, + "withoutBusinessKey": true + } + }, + "example-2": { + "summary": "Restarting one or more Process Instances using a historicProcessInstanceQuery", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "historicProcessInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId", + "processInstanceBusinessKey": "businessKey" + }, + "initialVariables": true, + "skipCustomListeners": true, + "withoutBusinessKey": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case following parameters are missing: `instructions`, `activityId` or `transitionId`,\n`processInstanceIds` or `historicProcessInstanceQuery`, an exception of type `InvalidRequestException` is returned. \nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/restart-async": { + "post": { + "operationId": "restartProcessInstanceAsyncOperation", + "tags": [ + "Process Definition" + ], + "summary": "Restart Process Instance Async", + "description": "Restarts process instances that were canceled or terminated asynchronously.\nCan also restart completed process instances.\nIt will create a new instance using the original instance information.\nTo execute the restart asynchronously, use the\n[Restart Process Instance](https://docs.camunda.org/manual/7.22/reference/rest/process-definition/post-restart-process-instance-sync/) method.\n\nFor more information about the difference between synchronous and asynchronous execution,\nplease refer to the related section of the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-restart/#execution).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition of the process instances to restart." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestartProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Restarting one or more Process Instances with known processInstanceIds", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "initialVariables": true, + "skipCustomListeners": true, + "withoutBusinessKey": true + } + }, + "example-2": { + "summary": "Restarting one or more Process Instances using a historicProcessInstanceQuery", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "historicProcessInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId", + "processInstanceBusinessKey": "businessKey" + }, + "initialVariables": true, + "skipCustomListeners": true, + "withoutBusinessKey": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case following parameters are missing: `instructions`, `activityId` or `transitionId`,\n`processInstanceIds` or `historicProcessInstanceQuery`,\nan exception of type `InvalidRequestException` is returned. \nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/start": { + "post": { + "operationId": "startProcessInstance", + "tags": [ + "Process Definition" + ], + "summary": "Start Instance", + "description": "Instantiates a given process definition.\nProcess variables and business key may be supplied in the request body.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to be retrieved." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Starting a process instance at its default initial activity", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + }, + "example-2": { + "summary": "Starting a process instance with variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey", + "withVariablesInReturn": true + } + }, + "example-3": { + "summary": "Starting a process instance at two specific activities", + "value": { + "variables": { + "aProcessVariable": { + "value": "aStringValue", + "type": "String" + } + }, + "businessKey": "myBusinessKey", + "skipCustomListeners": true, + "startInstructions": [ + { + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String" + } + } + }, + { + "type": "startAfterActivity", + "activityId": "anotherActivityId", + "variables": { + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceWithVariablesDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "Response for starting a process instance at its default initial activity", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + }, + "example-2": { + "summary": "Status 200 Response 2", + "description": "Response for starting a process instance with variables in return", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/aProcInstId", + "rel": "self" + } + ], + "id": "aProcInstId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": null, + "variables": { + "anotherVariable": { + "type": "Boolean", + "value": true, + "valueInfo": { + "transient": true + } + }, + "aVariable": { + "type": "String", + "value": "aStringValue", + "valueInfo": {} + } + } + } + }, + "example-3": { + "summary": "Status 200 Response 3", + "description": "Response for starting a process instance at two specific activities", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/startForm": { + "get": { + "operationId": "getStartForm", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Key", + "description": "Retrieves the key of the start form for a process definition.\nThe form key corresponds to the `FormData#formKey` property in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to get the start form key for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `process-definition/anId/startForm`", + "value": { + "key": "aFormKey", + "contextPath": "http://localhost:8080/my-process-application/" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no start form defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/static-called-process-definitions": { + "get": { + "operationId": "getStaticCalledProcessDefinitions", + "tags": [ + "Process Definition" + ], + "summary": "Get Static Called Process Definitions", + "description": "For the given process, returns a list of called process definitions corresponding\nto\nthe `CalledProcessDefinition` interface in the engine. The list\ncontains all process definitions\nthat are referenced statically by call activities in the given\nprocess. This endpoint does not\nresolve process definitions that are referenced with expressions. Each\ncalled process definition\ncontains a list of call activity ids, which specifies the call\nactivities that are calling that\nprocess. This endpoint does not resolve references to case\ndefinitions.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalledProcessDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/process-definition/aProcessDefinitionId/static-called-process-definitions`", + "description": "GET `/process-definition/aProcessDefinitionId/static-called-process-definitions`", + "value": [ + { + "id": "ACalledProcess:1:1bbd4e83-f8f1-11eb-9344", + "key": "ACalledProcess", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "ACalledProcess", + "version": 1, + "resource": "called-process.bpmn", + "deploymentId": "1baa3baf-f8f1-11eb-9344-0e0bbdd53e42", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "calledFromActivityIds": [ + "aCallActivityId" + ], + "callingProcessDefinitionId": "aProcessDefinitionId", + "startableInTasklist": true + }, + { + "id": "AnotherCalledProcess:2:1bc2f3d5-f8f1-11eb-9344", + "key": "AnotherCalledProcess", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "AnotherCalledProcess", + "version": 2, + "resource": "another-called-process.bpmn", + "deploymentId": "1baa3baf-f8f1-11eb-9344-0e0bbdd53e42", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "calledFromActivityIds": [ + "aSecondCallActivityId", + "aThirdCallActivityId" + ], + "callingProcessDefinitionId": "aProcessDefinitionId", + "startableInTasklist": true + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/statistics": { + "get": { + "operationId": "getActivityStatistics", + "tags": [ + "Process Definition" + ], + "summary": "Get Activity Instance Statistics", + "description": "Retrieves runtime statistics of a given process definition, grouped by activities.\nThese statistics include the number of running activity instances, optionally the number of failed jobs\nand also optionally the number of incidents either grouped by incident types or for a specific incident type.\n**Note**: This does not include historic data.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + }, + { + "name": "failedJobs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of failed jobs in the result or not. Valid values are `true` or `false`." + }, + { + "name": "incidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Valid values for this property are `true` or `false`.\nIf this property has been set to `true` the result will include the corresponding number of incidents\nfor each occurred incident type.\nIf it is set to `false`, the incidents will not be included in the result.\nCannot be used in combination with `incidentsForType`." + }, + { + "name": "incidentsForType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "If this property has been set with any incident type (i.e., a string value) the result\nwill only include the number of incidents for the assigned incident type.\nCannot be used in combination with `incidents`.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityStatisticsResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /process-definition/aProcessDefinitionId/statistics?failedJobs\u003dtrue", + "description": "Request with Query Parameter `failedJobs\u003dtrue`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anActivity", + "instances": 123, + "failedJobs": 42, + "incidents": [] + }, + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anotherActivity", + "instances": 124, + "failedJobs": 43, + "incidents": [] + } + ] + }, + "example-2": { + "summary": "GET /process-definition/aProcessDefinitionId/statistics?incidents\u003dtrue", + "description": "Request with Query Parameter `incidents\u003dtrue`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 42 + }, + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + }, + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anotherActivity", + "instances": 124, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 43 + }, + { + "incidentType": "anIncident", + "incidentCount": 22 + }, + { + "incidentType": "anotherIncident", + "incidentCount": 15 + } + ] + } + ] + }, + "example-3": { + "summary": "GET /process-definition/aProcessDefinitionId/statistics?incidentsForType\u003danIncident", + "description": "Request with Query Parameter `incidentsForType\u003danIncident`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/submit-form": { + "post": { + "operationId": "submitForm", + "tags": [ + "Process Definition" + ], + "summary": "Submit Start Form", + "description": "Starts a process instance using a set of process variables and the business key.\nIf the start event has Form Field Metadata defined, the process engine will perform backend validation\nfor any form fields which have validators defined.\nSee [Documentation on Generated Task Forms](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to submit the form for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceFormDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-definition/aProcessDefinitionId/submit-form`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "POST `/process-definition/aProcessDefinitionId/submit-form`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/suspended": { + "put": { + "operationId": "updateProcessDefinitionSuspensionStateById", + "tags": [ + "Process Definition" + ], + "summary": "Activate/Suspend By Id", + "description": "Activates or suspends a given process definition by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to activate or suspend." + } + ], + "requestBody": { + "description": "**Note**: Unallowed properties are `processDefinitionId` and `processDefinitionKey`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/aProcessDefinitionId/suspended`", + "value": { + "suspended": true, + "includeProcessInstances": true, + "executionDate": "2013-11-21T10:49:45T14:42:45" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if the provided `executionDate` parameter doesn\u0027t have the expected format or\nif the `processDefinitionKey` parameter is `null`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/xml": { + "get": { + "operationId": "getProcessDefinitionBpmn20Xml", + "tags": [ + "Process Definition" + ], + "summary": "Get XML", + "description": "Retrieves the BPMN 2.0 XML of a process definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-definition/id/aProcessDefinitionId/xml`", + "value": { + "id": "anProcessDefinitionId", + "bpmn20Xml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n\u003cdefinitions\n xmlns\u003d\"http://www.omg.org/spec/BPMN/20100524/MODEL\"\n xmlns:camunda\u003d\"http://camunda.org/schema/1.0/bpmn\"\n targetNamespace\u003d\"Examples\"\u003e\n \u003cprocess id\u003d\"oneTaskProcess\" isExecutable\u003d\"true\"\u003e\n \u003cstartEvent id\u003d\"theStart\" /\u003e\n \u003csequenceFlow id\u003d\"flow1\" sourceRef\u003d\"theStart\" targetRef\u003d\"theEnd\" /\u003e\n \u003cendEvent id\u003d\"theEnd\" /\u003e\n \u003c/process\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The Process Definition xml cannot be retrieved due to missing permissions on the Process Definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-instance": { + "get": { + "operationId": "getProcessInstances", + "tags": [ + "Process Instance" + ], + "summary": "Get List", + "description": "Queries for process instances that fulfill given parameters.\nParameters may be static as well as dynamic runtime properties of process instances.\nThe size of the result set can be retrieved by using the Get Instance Count method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "instanceId", + "definitionKey", + "definitionId", + "tenantId", + "businessKey" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process instance ids." + }, + { + "name": "businessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "businessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances run on." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition keys.\nA process instance must have one of the given process definition keys." + }, + { + "name": "processDefinitionKeyNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Exclude instances by a comma-separated list of process definition keys.\nA process instance must not have one of the given process definition keys." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "superProcessInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given process instance.\nTakes a process instance id." + }, + { + "name": "subProcessInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that have the given process instance as a sub process instance.\nTakes a process instance id." + }, + { + "name": "superCaseInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance.\nTakes a case instance id." + }, + { + "name": "subCaseInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that have the given case instance as a sub case instance.\nTakes a case instance id." + }, + { + "name": "active", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include active process instances. Value may only be true,\nas false is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include suspended process instances. Value may only be true,\nas false is the default behavior." + }, + { + "name": "withIncident", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Filter by presence of incidents. Selects only process instances that have an incident." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A process instance must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include process instances which belong to no tenant." + }, + { + "name": "processDefinitionWithoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include process instances which process definition has no tenant id." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of activity ids.\nA process instance must currently wait in a leaf activity with one of the given activity ids." + }, + { + "name": "rootProcessInstances", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are top level process instances." + }, + { + "name": "leafProcessInstances", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are leaf instances. (i.e. don\u0027t have any sub instances)." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that have variables with certain values.\nVariable filtering expressions are comma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable names in this query case-insensitively.\nIf set to true variableName and variablename are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable values in this query case-insensitively.\nIf set to true variableValue and variablevalue are treated as equal." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/process-instance?variables\u003dmyVariable_eq_camunda,mySecondVariable_neq_aBadValue`", + "value": [ + { + "links": [], + "id": "anId", + "definitionId": "aProcDefId", + "businessKey": "aKey", + "caseInstanceId": "aCaseInstanceId", + "ended": false, + "suspended": false, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid,\nfor example if a sortOrder parameter is supplied, but no sortBy, or if an invalid operator for variable comparison is used." + } + } + }, + "post": { + "operationId": "queryProcessInstances", + "tags": [ + "Process Instance" + ], + "summary": "Get List (POST)", + "description": "Queries for process instances that fulfill given parameters through a JSON object.\nThis method is slightly more powerful than the Get Instances method because\nit allows filtering by multiple process variables of types `string`, `number` or `boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance` Request Body 1", + "value": { + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId", + "sorting": [ + { + "sortBy": "definitionKey", + "sortOrder": "asc" + }, + { + "sortBy": "instanceId", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": [ + { + "links": [], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "aKey", + "caseInstanceId": "aCaseInstanceId", + "ended": false, + "suspended": false, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid,\nfor example if a sortOrder parameter is supplied, but no sortBy, or if an invalid operator for variable comparison is used." + } + } + } + }, + "/process-instance/count": { + "get": { + "operationId": "getProcessInstancesCount", + "tags": [ + "Process Instance" + ], + "summary": "Get List Count", + "description": "Queries for the number of process instances that fulfill given parameters.", + "parameters": [ + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process instance ids." + }, + { + "name": "businessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "businessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances run on." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition keys.\nA process instance must have one of the given process definition keys." + }, + { + "name": "processDefinitionKeyNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Exclude instances by a comma-separated list of process definition keys.\nA process instance must not have one of the given process definition keys." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "superProcessInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given process instance.\nTakes a process instance id." + }, + { + "name": "subProcessInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that have the given process instance as a sub process instance.\nTakes a process instance id." + }, + { + "name": "superCaseInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance.\nTakes a case instance id." + }, + { + "name": "subCaseInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that have the given case instance as a sub case instance.\nTakes a case instance id." + }, + { + "name": "active", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include active process instances. Value may only be true,\nas false is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include suspended process instances. Value may only be true,\nas false is the default behavior." + }, + { + "name": "withIncident", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Filter by presence of incidents. Selects only process instances that have an incident." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A process instance must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include process instances which belong to no tenant." + }, + { + "name": "processDefinitionWithoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include process instances which process definition has no tenant id." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of activity ids.\nA process instance must currently wait in a leaf activity with one of the given activity ids." + }, + { + "name": "rootProcessInstances", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are top level process instances." + }, + { + "name": "leafProcessInstances", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are leaf instances. (i.e. don\u0027t have any sub instances)." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that have variables with certain values.\nVariable filtering expressions are comma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable names in this query case-insensitively.\nIf set to true variableName and variablename are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable values in this query case-insensitively.\nIf set to true variableValue and variablevalue are treated as equal." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/process-instance/count?variables\u003dmyVariable_eq_camunda`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example an invalid operator for variable comparison is used." + } + } + }, + "post": { + "operationId": "queryProcessInstancesCount", + "tags": [ + "Process Instance" + ], + "summary": "Get List Count (POST)", + "description": "Queries for the number of process instances that fulfill the given parameters.\nThis method takes the same message body as the Get Instances (POST) method and\ntherefore it is slightly more powerful than the Get Instance Count method.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/count` Request Body 1", + "value": { + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if an invalid operator for variable comparison is used." + } + } + } + }, + "/process-instance/delete": { + "post": { + "operationId": "deleteProcessInstancesAsyncOperation", + "tags": [ + "Process Instance" + ], + "summary": "Delete Async (POST)", + "description": "Deletes multiple process instances asynchronously (batch).", + "requestBody": { + "description": "**Unallowed property**: `historicProcessInstanceQuery`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteProcessInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/delete` Request Body 1", + "value": { + "deleteReason": "aReason", + "processInstanceIds": [ + "aProcess", + "secondProcess" + ], + "skipCustomListeners": true, + "skipSubprocesses": true, + "skipIoMappings": false + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, i.e., neither processInstanceIds, nor processInstanceQuery is present" + } + } + } + }, + "/process-instance/delete-historic-query-based": { + "post": { + "operationId": "deleteAsyncHistoricQueryBased", + "tags": [ + "Process Instance" + ], + "summary": "Delete Async Historic Query Based (POST)", + "description": "Deletes a set of process instances asynchronously (batch) based on a historic process instance query.", + "requestBody": { + "description": "**Unallowed property**: `processInstanceQuery`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteProcessInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/delete-historic-query-based` Request Body 1", + "value": { + "deleteReason": "aReason", + "historicProcessInstanceQuery": { + "startedBefore": "2017-04-28T11:24:37.765+0200" + }, + "skipCustomListeners": true, + "skipSubprocesses": true, + "skipIoMappings": false + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, i.e., neither processInstanceIds, nor historicProcessInstanceQuery is present" + } + } + } + }, + "/process-instance/job-retries": { + "post": { + "operationId": "setRetriesByProcess", + "tags": [ + "Process Instance" + ], + "summary": "Set Job Retries Async (POST)", + "description": "Create a batch to set retries of jobs associated with given processes asynchronously.", + "requestBody": { + "description": "Please note that if both processInstances and processInstanceQuery are provided,\nthen the resulting execution will be performed on the union of these sets.\n**Unallowed property**: `historicProcessInstanceQuery`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetJobRetriesByProcessDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/job-retries` Request Body 1", + "value": { + "retries": 5, + "dueDate": "2017-04-06T13:57:45.000+0200", + "processInstances": [ + "aProcess", + "secondProcess" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId" + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if neither processInstanceIds, nor processInstanceQuery is present.\nOr if the retry count is not specified." + } + } + } + }, + "/process-instance/job-retries-historic-query-based": { + "post": { + "operationId": "setRetriesByProcessHistoricQueryBased", + "tags": [ + "Process Instance" + ], + "summary": "Set Job Retries Async Historic Query Based (POST)", + "description": "Create a batch to set retries of jobs asynchronously based on a historic process instance query.", + "requestBody": { + "description": "Please note that if both processInstances and historicProcessInstanceQuery are provided,\nthen the resulting execution will be performed on the union of these sets.\n**Unallowed property**: `processInstanceQuery`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetJobRetriesByProcessDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/job-retries-historic-query-based` Request Body 1", + "value": { + "retries": 5, + "dueDate": "2017-04-06T13:57:45.000+0200", + "historicProcessInstanceQuery": { + "startedBefore": "2017-04-28T11:24:37.769+0200" + }, + "processInstances": [ + "aProcess", + "secondProcess" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if neither processInstanceIds, nor historicProcessInstanceQuery is present.\nOr if the retry count is not specified." + } + } + } + }, + "/process-instance/message-async": { + "post": { + "operationId": "correlateMessageAsyncOperation", + "tags": [ + "Process Instance" + ], + "summary": "Correlate Message Async (POST)", + "description": "Correlates a message asynchronously to executions that are waiting for this message. \nMessages will not be correlated to process definition-level start message events to start process instances.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CorrelationMessageAsyncDto" + }, + "examples": { + "example-1": { + "summary": "POST /process-instance/message-async", + "description": "Correlate a message to process instances in a batch", + "value": { + "messageName": "a-message-name", + "processInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7" + ], + "processInstanceQuery": { + "processDefinitionKey": "my-process-definition-key" + }, + "variables": { + "myVariableName": { + "value": "myStringValue" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "correlate-message", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\n* If none of `processInstanceIds`, `processInstanceQuery`, and `historicProcessInstanceQuery` is given\n* If no process instance ids where found" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Returned if the user is not allowed to create the batch.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/process-instance/suspended": { + "put": { + "operationId": "updateSuspensionState", + "tags": [ + "Process Instance" + ], + "summary": "Activate/Suspend In Group", + "description": "Activates or suspends process instances by providing certain criteria:\n\n# Activate/Suspend Process Instance By Process Definition Id\n* `suspend`\n* `processDefinitionId`\n\n# Activate/Suspend Process Instance By Process Definition Key\n\n* `suspend`\n* `processDefinitionKey`\n* `processDefinitionTenantId`\n* `processDefinitionWithoutTenantId`\n\n# Activate/Suspend Process Instance In Group\n* `suspend`\n* `processInstanceIds`\n* `processInstanceQuery`\n* `historicProcessInstanceQuery`", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-instance/suspended`", + "description": "Suspend Process Instance By Process Definition Id", + "value": { + "processDefinitionId": "aProcDefId", + "suspended": true + } + }, + "example-2": { + "summary": "PUT `/process-instance/suspended`", + "description": "Suspend Process Instance By Process Definition Key", + "value": { + "processDefinitionKey": "aProcDefKey", + "suspended": true + } + }, + "example-3": { + "summary": "PUT `/process-instance/suspended`", + "description": "Suspend Process Instance In Group", + "value": { + "processInstanceIds": [ + "processInstanceId1", + "processInstanceIdN" + ], + "suspended": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the request parameters are invalid,\nfor example if the provided processDefinitionId or processDefinitionKey parameter is null." + } + } + } + }, + "/process-instance/suspended-async": { + "post": { + "operationId": "updateSuspensionStateAsyncOperation", + "tags": [ + "Process Instance" + ], + "summary": "Activate/Suspend In Batch", + "description": "Activates or suspends process instances asynchronously with a list of process instance ids,\na process instance query, and/or a historical process instance query.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceSuspensionStateAsyncDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/suspended-async`", + "description": "Suspend Process Instance In Batch", + "value": { + "processInstanceIds": [ + "processInstanceId1", + "processInstanceIdN" + ], + "suspended": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the request parameters are invalid,\nfor example if the provided processDefinitionId or processDefinitionKey parameter is null." + } + } + } + }, + "/process-instance/variables-async": { + "post": { + "operationId": "setVariablesAsyncOperation", + "tags": [ + "Process Instance" + ], + "summary": "Set Variables Async (POST)", + "description": "Update or create runtime process variables in the root scope of process instances.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetVariablesAsyncDto" + }, + "examples": { + "example-1": { + "summary": "POST /process-instance/variables-async", + "description": "Set variables to process instances in a batch", + "value": { + "processInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7" + ], + "processInstanceQuery": { + "processDefinitionKey": "my-process-definition-key" + }, + "variables": { + "myVariableName": { + "value": "myStringValue" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "set-variables", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\n* The variable value or type is invalid, for example if the value could not be parsed to an Integer value or\nthe passed variable type is not supported\n* If none of `processInstanceIds`, `processInstanceQuery` and `historicProcessInstanceQuery` is given\n* If no or an empty array of `variables` is given\n* If no process instance ids where found\n* If a transient variable is set\n* If the engine config flag `javaSerializationFormatEnabled` is `false` and a Java serialized variable is given" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Returned if the user is not allowed to create the batch.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/process-instance/{id}": { + "delete": { + "operationId": "deleteProcessInstance", + "tags": [ + "Process Instance" + ], + "summary": "Delete", + "description": "Deletes a running process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to be deleted." + }, + { + "name": "skipCustomListeners", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to true, the custom listeners will be skipped." + }, + { + "name": "skipIoMappings", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to true, the input/output mappings will be skipped." + }, + { + "name": "skipSubprocesses", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to true, subprocesses related to deleted processes will be skipped." + }, + { + "name": "failIfNotExists", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "If set to false, the request will still be successful if the process id is not found." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nProcess instance with given id does not exist. " + } + } + }, + "get": { + "operationId": "getProcessInstance", + "tags": [ + "Process Instance" + ], + "summary": "Get Process Instance", + "description": "Retrieves a process instance by id, according to the `ProcessInstance` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-instance/aProcessInstanceId`", + "value": { + "id": "aProcessInstanceId", + "definitionId": "aProcDefId", + "businessKey": "aKey", + "caseInstanceId": "aCaseInstanceId", + "ended": false, + "suspended": false, + "tenantId": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process instance with given id does not exist. See the \n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format. " + } + } + } + }, + "/process-instance/{id}/activity-instances": { + "get": { + "operationId": "getActivityInstanceTree", + "tags": [ + "Process Instance" + ], + "summary": "Get Activity Instance", + "description": "Retrieves an Activity Instance (Tree) for a given process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance for which the activity instance should be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityInstanceDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-instance/aProcessInstanceId/activity-instances`", + "value": { + "id": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "parentActivityInstanceId": null, + "activityId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6", + "activityType": "processDefinition", + "processInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "processDefinitionId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6", + "childActivityInstances": [ + { + "id": "approveInvoice:eca89509-f70c-11e9-8777-e4a7a094a9d6", + "parentActivityInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "activityId": "approveInvoice", + "activityType": "userTask", + "processInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "processDefinitionId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6", + "childActivityInstances": [], + "childTransitionInstances": [], + "executionIds": [ + "eca75c6b-f70c-11e9-8777-e4a7a094a9d6" + ], + "activityName": "Approve Invoice", + "incidentIds": [ + "648d7e21-f71c-11e9-a725-e4a7a094a9d6" + ], + "incidents": [ + { + "id": "648d7e21-f71c-11e9-a725-e4a7a094a9d6", + "activityId": "AttachedTimerBoundaryEvent" + } + ], + "name": "Approve Invoice" + } + ], + "childTransitionInstances": [], + "executionIds": [ + "eca75c6b-f70c-11e9-8777-e4a7a094a9d6" + ], + "activityName": "Invoice Receipt", + "incidentIds": null, + "incidents": null, + "name": "Invoice Receipt" + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process instance with given id does not exist." + } + } + } + }, + "/process-instance/{id}/comment": { + "get": { + "operationId": "getProcessInstanceComments", + "tags": [ + "Process Instance" + ], + "summary": "Get Process Instance Comments", + "description": "Gets the comments for a process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to retrieve the comments for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /process-instance/aProcessInstanceId/comment", + "value": [ + { + "id": "commentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "aProcessInstanceId", + "time": "2013-01-02T21:37:03.764+0200", + "message": "message", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "anotherCommentId", + "userId": "anotherUserId", + "taskId": "aTaskId", + "processInstanceId": "aProcessInstanceId", + "time": "2013-02-23T20:37:43.975+0200", + "message": "anotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "yetAnotherCommentId", + "userId": "yetAnotherUserId", + "taskId": "aTaskId", + "processInstanceId": "aProcessInstanceId", + "time": "2013-04-21T10:15:23.764+0200", + "message": "yetAnotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No process instance exists for the given process instance id. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-instance/{id}/modification": { + "post": { + "operationId": "modifyProcessInstance", + "tags": [ + "Process Instance" + ], + "summary": "Modify Process Instance Execution State", + "description": "Submits a list of modification instructions to change a process instance\u0027s execution state.\nA modification instruction is one of the following:\n\n* Starting execution before an activity\n* Starting execution after an activity on its single outgoing sequence flow\n* Starting execution on a specific sequence flow\n* Canceling an activity instance, transition instance, or all instances (activity or transition) for an activity\n\nInstructions are executed immediately and in the order they are provided in this request\u0027s body.\nVariables can be provided with every starting instruction.\n\nThe exact semantics of modification can be read about in the [User guide](https://docs.camunda.org/manual/develop/user-guide/process-engine/process-instance-modification/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to modify." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceModificationDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/modification`", + "value": { + "skipCustomListeners": true, + "skipIoMappings": true, + "instructions": [ + { + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String" + }, + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + }, + { + "type": "cancel", + "activityInstanceId": "anActivityInstanceId" + } + ], + "annotation": "Modified to resolve an error." + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "At least one modification instruction misses required parameters." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The modification cannot be performed, for example because it starts a failing activity." + } + } + } + }, + "/process-instance/{id}/modification-async": { + "post": { + "operationId": "modifyProcessInstanceAsyncOperation", + "tags": [ + "Process Instance" + ], + "summary": "Modify Process Instance Execution State Async", + "description": "Submits a list of modification instructions to change a process instance\u0027s execution state async.\nA modification instruction is one of the following:\n\n* Starting execution before an activity\n* Starting execution after an activity on its single outgoing sequence flow\n* Starting execution on a specific sequence flow\n* Cancelling an activity instance, transition instance, or all instances (activity or transition) for an activity\n\nInstructions are executed asynchronous and in the order they are provided in this request\u0027s body.\nVariables can be provided with every starting instruction.\n\nThe exact semantics of modification can be read about in the\n[User guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-modification/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to modify." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceModificationDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/modification-async`", + "value": { + "skipCustomListeners": true, + "skipIoMappings": true, + "instructions": [ + { + "type": "startBeforeActivity", + "activityId": "activityId" + }, + { + "type": "cancel", + "activityInstanceId": "anActivityInstanceId" + } + ], + "annotation": "Modified to resolve an error." + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nAt least one modification instruction misses required parameters." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Forbidden\nIf the user is not allowed to execute batches. See the Introduction for the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The modification cannot be performed, for example because it starts a failing activity." + } + } + } + }, + "/process-instance/{id}/suspended": { + "put": { + "operationId": "updateSuspensionStateById", + "tags": [ + "Process Instance" + ], + "summary": "Activate/Suspend Process Instance By Id", + "description": "Activates or suspends a given process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to activate or suspend." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-instance/aProcessInstanceId/suspended`", + "value": { + "suspended": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + } + } + } + }, + "/process-instance/{id}/variables": { + "get": { + "operationId": "getProcessInstanceVariables", + "tags": [ + "Process Instance" + ], + "summary": "Get Process Variables", + "description": "Retrieves all variables of a given process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to retrieve the variables from." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\nNote: While true is the default value for reasons of backward compatibility, we recommend setting this parameter to false\nwhen developing web applications that are independent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/process-instance/aProcessInstanceId/variables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }, + "example-2": { + "summary": "GET `/process-instance/aProcessInstanceId/variables?deserializeValue\u003dfalse`", + "value": { + "aVariableKey": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process instance with given id does not exist." + } + } + }, + "post": { + "operationId": "modifyProcessInstanceVariables", + "tags": [ + "Process Instance" + ], + "summary": "Update/Delete Process Variables", + "description": "Updates or deletes the variables of a process instance by id. Updates precede deletions.\nSo, if a variable is updated AND deleted, the deletion overrides the update.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to set variables for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchVariablesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/variables`", + "description": "Status 204 Response: No content.", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nThe variable value or type is invalid, for example if the value could not be parsed to an Integer value or\nthe passed variable type is not supported." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Update or delete could not be executed, for example because the process instance does not exist." + } + } + } + }, + "/process-instance/{id}/variables/{varName}": { + "delete": { + "operationId": "deleteProcessInstanceVariable", + "tags": [ + "Process Instance" + ], + "summary": "Delete Process Variable", + "description": "Deletes a variable of a process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to delete the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to delete." + } + ], + "responses": { + "204": { + "description": "Request successful." + } + } + }, + "get": { + "operationId": "getProcessInstanceVariable", + "tags": [ + "Process Instance" + ], + "summary": "Get Process Variable", + "description": "Retrieves a variable of a given process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\nNote: While true is the default value for reasons of backward compatibility, we recommend setting this parameter to false\nwhen developing web applications that are independent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-instance/aProcessInstanceId/variables/myObject123`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }, + "example-2": { + "summary": "GET `/process-instance/aProcessInstanceId/variables/myObject123?deserializeValue\u003dfalse`", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nVariable with given id does not exist." + } + } + }, + "put": { + "operationId": "setProcessInstanceVariable", + "tags": [ + "Process Instance" + ], + "summary": "Update Process Variable", + "description": "Sets a variable of a given process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to set the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to set." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "PUT /process-instance/aProcessInstanceId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "someValue", + "type": "String" + } + }, + "example-2": { + "summary": "PUT /process-instance/aProcessInstanceId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nThe variable value or type is invalid, for example if the value could not be parsed to an Integer value or\nthe passed variable type is not supported." + } + } + } + }, + "/process-instance/{id}/variables/{varName}/data": { + "get": { + "operationId": "getProcessInstanceVariableBinary", + "tags": [ + "Process Instance" + ], + "summary": "Get Process Variable (Binary)", + "description": "Retrieves the content of a Process Variable by the Process Instance id and the Process Variable name.\nApplicable for byte array or file Process Variables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "responses": { + "200": { + "description": "Request successful.\n For binary variables or files without any MIME type information, a byte stream is returned.\n File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "binary variable: Status 200", + "value": "Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "file variable: Status 200", + "value": "Content-Type: text/plain; charset\u003dUTF-8. Content-Disposition: attachment; filename\u003d\"someFile.txt\"" + } + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nA Process Variable with the given id exists but does not serialize as binary data." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not Found\nA Process Variable with the given id does not exist. " + } + } + }, + "post": { + "operationId": "setProcessInstanceVariableBinary", + "tags": [ + "Process Instance" + ], + "summary": "Update Process Variable (Binary)", + "description": "Sets the serialized value for a binary variable or the binary value for a file variable.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "requestBody": { + "description": "For binary variables a multipart form submit with the following parts:", + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormVariableBinaryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/variables/aVarName/data` (1)", + "description": "Post binary content of a byte array variable.", + "value": "\n ```\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"image.png\"\n Content-Type: application/octet-stream\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n Bytes\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-2": { + "summary": "POST `/process-instance/aProcessInstanceId/variables/aVarName/data` (2)", + "description": "Post the JSON serialization of a Java Class (**deprecated**).", + "value": "\n ```\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"type\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n java.util.ArrayList\u003cjava.lang.Object\u003e\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"data\"\n Content-Type: application/json; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n [\"foo\",\"bar\"]\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-3": { + "summary": "POST `/process-instance/aProcessInstanceId/variables/aVarName/data` (3)", + "description": "Post a text file.", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"myFile.txt\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n File\n ------------------------------1e838f8f632a--\n ```\n " + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nThe variable value or type is invalid, for example if no filename is set." + } + } + } + }, + "/schema/log": { + "get": { + "operationId": "getSchemaLog", + "tags": [ + "Schema Log" + ], + "summary": "Get List", + "description": "Queries for schema log entries that fulfill given parameters.", + "parameters": [ + { + "name": "version", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only return schema log entries with a specific version." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "timestamp" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchemaLogEntryDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [ + { + "id": "0", + "version": "7.11.0", + "timestamp": "2019-05-13T09:07:11.751+0200" + }, + { + "id": "1", + "version": "7.11.1", + "timestamp": "2019-06-1T17:22:05.123+0200" + } + ] + } + } + } + }, + "description": "Request successful.\n**Note**: In order to get any results a user of group `camunda-admin` must\nbe authenticated." + } + } + }, + "post": { + "operationId": "querySchemaLog", + "tags": [ + "Schema Log" + ], + "summary": "Get List (POST)", + "description": "Queries for schema log entries that fulfill given parameters.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchemaLogQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST /schema/log", + "description": "The content of the Request Body", + "value": { + "version": "7.11.0", + "sortBy": "timestamp", + "sortOrder": "asc" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchemaLogEntryDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [ + { + "id": "0", + "version": "7.11.0", + "timestamp": "2019-05-13T09:07:11.751+0200" + } + ] + } + } + } + }, + "description": "Request successful.\n**Note**: In order to get any results a user of group camunda-admin must be\nauthenticated." + } + } + } + }, + "/signal": { + "post": { + "operationId": "throwSignal", + "tags": [ + "Signal" + ], + "summary": "Event", + "description": "A signal is an event of global scope (broadcast semantics) and is delivered to all\nactive handlers. Internally this maps to the engine\u0027s signal event received builder\nmethod `RuntimeService#createSignalEvent()`. For more information about the signal\nbehavior, see the [Signal Events](https://docs.camunda.org/manual/7.22/reference/bpmn20/events/signal-events/)\nsection of the [BPMN 2.0 Implementation Reference](https://docs.camunda.org/manual/7.22/reference/bpmn20/).", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignalDto" + }, + "examples": { + "examle-1": { + "summary": "POST /signal", + "description": "The content of the Request Body", + "value": { + "name": "policy_conditions_changed", + "variables": { + "newTimePeriodInMonth": { + "value": 24 + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if:\n\n* no name was given\n* the variable value or type is invalid, for example if the value could not be\nparsed to an integer value or the passed variable type is not supported\n* a tenant id and an execution id is specified.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Returned if the user is not allowed to throw a signal event.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if a single execution is specified and no such execution exists or has not\nsubscribed to the signal.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/task": { + "get": { + "operationId": "getTasks", + "tags": [ + "Task" + ], + "summary": "Get List", + "description": "Queries for tasks that fulfill a given filter. The size of the result set can be\nretrieved by using the Get Task Count method.\n\n**Security Consideration:** There are several query parameters (such as\nassigneeExpression) for specifying an EL expression. These are disabled by default to\nprevent remote code execution. See the section on\n[security considerations](https://docs.camunda.org/manual/7.22/user-guide/process-engine/securing-custom-code/)\nfor custom code in the user guide for details.", + "parameters": [ + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to task with the given id." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with any of the given ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given id." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given ids." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given business key." + }, + { + "name": "processInstanceBusinessKeyExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given business key which \nis described by an expression. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with one of the give business keys. \nThe keys need to be in a comma-separated list." + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring." + }, + { + "name": "processInstanceBusinessKeyLikeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring and is described by an expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with one of the given keys. The \nkeys need to be in a comma-separated list." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + { + "name": "processDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process definition name that has the parameter value as \na substring." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to an execution with the given id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to case instances with the given id." + }, + { + "name": "caseInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to case instances with the given business key." + }, + { + "name": "caseInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a case instance business key that has the parameter value \nas a substring." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given id." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + { + "name": "caseDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + { + "name": "caseDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a case definition name that has the parameter value as a \nsubstring." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case execution with the given id." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated activity \ninstance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated \ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which belong to no tenant. Value may only be `true`, \nas `false` is the default behavior." + }, + { + "name": "assignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user is assigned to." + }, + { + "name": "assigneeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the user described by the given expression is assigned to. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "assigneeLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have an assignee that has the parameter \nvalue as a substring." + }, + { + "name": "assigneeLikeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have an assignee that has the parameter value described by the \ngiven expression as a substring. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "assigneeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which are assigned to one of the passed and \ncomma-separated user ids." + }, + { + "name": "assigneeNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which are not assigned to one of the passed and\ncomma-separated user ids." + }, + { + "name": "owner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user owns." + }, + { + "name": "ownerExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the user described by the given expression owns. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "candidateGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the given group." + }, + { + "name": "candidateGroupLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to groups that have the parameter value as a substring." + }, + { + "name": "candidateGroupExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the group described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "candidateUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the given user or to one of his groups." + }, + { + "name": "candidateUserExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the user described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "includeAssignedTasks", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Also include tasks that are assigned to users in candidate queries. Default is to only \ninclude tasks that are not assigned to any user if you query by candidate user or\ngroup(s)." + }, + { + "name": "involvedUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that the given user is involved in. A user is involved in a task if \nan identity link exists between task and user (e.g., the user is the assignee)." + }, + { + "name": "involvedUserExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that the user described by the given expression is involved in.\nA user is involved in a task if an identity link exists between task and user\n(e.g., the user is the assignee). See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + { + "name": "assigned", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + { + "name": "unassigned", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + { + "name": "taskDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given key." + }, + { + "name": "taskDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the given keys. The keys need to be in a\ncomma-separated list." + }, + { + "name": "taskDefinitionKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a key that has the parameter value as a substring." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given name." + }, + { + "name": "nameNotEqual", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that do not have the given name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + { + "name": "nameNotLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that do not have a name with the given parameter\nvalue as substring." + }, + { + "name": "description", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given description." + }, + { + "name": "descriptionLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a description that has the parameter\nvalue as a substring." + }, + { + "name": "priority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have the given priority." + }, + { + "name": "maxPriority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have a lower or equal priority." + }, + { + "name": "minPriority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have a higher or equal priority." + }, + { + "name": "dueDate", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "dueDateExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due on the date described by the given expression. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "dueAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.435+0200`." + }, + { + "name": "dueAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "dueBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.243+0200`." + }, + { + "name": "dueBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "withoutDueDate", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no due date. Value may only be `true`, \nas `false` is the default behavior." + }, + { + "name": "followUpDate", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.342+0200`." + }, + { + "name": "followUpDateExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date on the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ndate must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.542+0200`." + }, + { + "name": "followUpAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date after the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ndate must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.234+0200`." + }, + { + "name": "followUpBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date before the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpBeforeOrNotExistent", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have no followUp date or a followUp date before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.432+0200`. The\ntypical use case is to query all `active` tasks for a user for a given date." + }, + { + "name": "followUpBeforeOrNotExistentExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have no followUp date or a followUp date before the date\ndescribed by the given expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdOn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.324+0200`." + }, + { + "name": "createdOnExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created on the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.342+0200`." + }, + { + "name": "createdAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + { + "name": "createdBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "updatedAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were updated after the given date. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must\nhave the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + { + "name": "updatedAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were updated after the date described by the given expression. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "delegationState", + "in": "query", + "schema": { + "enum": [ + "PENDING", + "RESOLVED" + ], + "type": "string" + }, + "description": "Restrict to tasks that are in the given delegation state. Valid values are\n`PENDING` and `RESOLVED`." + }, + { + "name": "candidateGroups", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are offered to any of the given candidate groups. Takes a\ncomma-separated list of group names, so for example `developers,support,sales`." + }, + { + "name": "candidateGroupsExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are offered to any of the candidate groups described by the\ngiven expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to\n`java.util.List` of Strings." + }, + { + "name": "withCandidateGroups", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateGroups", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withCandidateUsers", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have a candidate user. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateUsers", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no candidate users. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "active", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include active tasks. Value may only be `true`, as `false`\nis the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include suspended tasks. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "taskVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that have variables with certain values. Variable filtering\nexpressions are comma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to process instances that have variables with certain \nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`;\n`notLike`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "caseInstanceVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to case instances that have variables with certain\nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable names in this query case-insensitively. If set\n`variableName` and `variablename` are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable values in this query case-insensitively. If set\n`variableValue` and `variablevalue` are treated as equal." + }, + { + "name": "parentTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all tasks that are sub tasks of the given task. Takes a task id." + }, + { + "name": "withCommentAttachmentInfo", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Check if task has attachments and/or comments. Value may only be `true`, as\n`false` is the default behavior.\nAdding the filter will do additional attachment and comments queries to the database,\nit might slow down the query in case of tables having high volume of data.\nThis param is not considered for count queries" + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "instanceId", + "caseInstanceId", + "dueDate", + "executionId", + "caseExecutionId", + "assignee", + "created", + "lastUpdated", + "description", + "id", + "name", + "nameCaseInsensitive", + "priority", + "processVariable", + "executionVariable", + "taskVariable", + "caseExecutionVariable", + "caseInstanceVariable" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskWithAttachmentAndCommentDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response 1", + "description": "Response for GET `/task?assignee\u003danAssignee\u0026delegationState\u003dRESOLVED\u0026maxPriority\u003d50`", + "value": [ + { + "id": "anId", + "name": "aName", + "assignee": "anAssignee", + "created": "2013-01-23T13:42:42.657+0200", + "due": "2013-01-23T13:49:42.323+0200", + "followUp:": "2013-01-23T13:44:42.987+0200", + "lastUpdated:": "2013-01-23T13:44:42.987+0200", + "delegationState": "RESOLVED", + "description": "aDescription", + "executionId": "anExecution", + "owner": "anOwner", + "parentTaskId": "aParentId", + "priority": 42, + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "taskDefinitionKey": "aTaskDefinitionKey", + "suspended": false, + "formKey": "aFormKey", + "camundaFormRef": { + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "taskState": "aTaskState" + } + ] + }, + "example-2": { + "summary": "Status 200 response 2", + "description": "Response for GET `/task?assignee\u003danAssignee\u0026withCommentAttachmentInfo\u003dtrue`", + "value": [ + { + "id": "anId", + "name": "aName", + "assignee": "anAssignee", + "created": "2013-01-23T13:42:42.657+0200", + "due": "2013-01-23T13:49:42.323+0200", + "followUp:": "2013-01-23T13:44:42.987+0200", + "lastUpdated:": "2013-01-23T13:44:42.987+0200", + "delegationState": "RESOLVED", + "description": "aDescription", + "executionId": "anExecution", + "owner": "anOwner", + "parentTaskId": "aParentId", + "priority": 42, + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "taskDefinitionKey": "aTaskDefinitionKey", + "suspended": false, + "formKey": "aFormKey", + "camundaFormRef": { + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "attachment": false, + "comment": false + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator for variable\ncomparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryTasks", + "tags": [ + "Task" + ], + "summary": "Get List (POST)", + "description": "Queries for tasks that fulfill a given filter. This method is slightly more powerful\nthan the [Get Tasks](https://docs.camunda.org/manual/7.22/reference/rest/task/get-query/) method because it\nallows filtering by multiple process or task variables of types `String`, `Number`\nor `Boolean`. The size of the result set can be retrieved by using the\n[Get Task Count (POST)](https://docs.camunda.org/manual/7.22/reference/rest/task/post-query-count/) method.\n\n**Security Consideration**:\nThere are several parameters (such as `assigneeExpression`) for specifying an EL\nexpression. These are disabled by default to prevent remote code execution. See the\nsection on\n[security considerations for custom code](https://docs.camunda.org/manual/7.22/user-guide/process-engine/securing-custom-code/)\nin the user guide for details.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task` Request Body 1", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "processInstanceBusinessKeyIn": "aBusinessKey,anotherBusinessKey", + "assigneeIn": "anAssignee,anotherAssignee", + "priority": 10, + "sorting": [ + { + "sortBy": "dueDate", + "sortOrder": "asc" + }, + { + "sortBy": "processVariable", + "sortOrder": "desc", + "parameters": { + "variable": "orderId", + "type": "String" + } + } + ] + } + }, + "example-2": { + "summary": "POST `/task` Request Body 2", + "description": "Logical query: assignee \u003d \"John Munda\" AND (name \u003d \"Approve Invoice\" OR priority \u003d 5) AND (suspended \u003d false OR taskDefinitionKey \u003d \"approveInvoice\")", + "value": { + "assignee": "John Munda", + "withCommentAttachmentInfo": "true", + "orQueries": [ + { + "name": "Approve Invoice", + "priority": 5 + }, + { + "suspended": false, + "taskDefinitionKey": "approveInvoice" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskWithAttachmentAndCommentDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response 1", + "value": [ + { + "id": "anId", + "name": "aName", + "assignee": "anAssignee", + "created": "2013-01-23T13:42:42.453+0200", + "due": "2013-01-23T13:49:42.342+0200", + "followUp:": "2013-01-23T13:44:42.546+0200", + "lastUpdated:": "2013-01-23T13:44:42.546+0200", + "delegationState": "RESOLVED", + "description": "aDescription", + "executionId": "anExecution", + "owner": "anOwner", + "parentTaskId": "aParentId", + "priority": 10, + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "taskDefinitionKey": "aTaskDefinitionKey", + "suspended": false, + "formKey": "aFormKey", + "camundaFormRef": { + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "taskState": "aTaskState" + } + ] + }, + "example-2": { + "summary": "Status 200 response 2", + "value": [ + { + "id": "349fffa8-6571-11e7-9a44-d6940f5ef88d", + "name": "Approve Invoice", + "assignee": "John Munda", + "created": "2017-07-10T15:10:54.670+0200", + "due": "2017-07-17T15:10:54.670+0200", + "followUp": null, + "lastUpdated": "2017-07-17T15:10:54.670+0200", + "delegationState": null, + "description": "Approve the invoice (or not).", + "executionId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "invoice:1:2c8d8057-6571-11e7-9a44-d6940f5ef88d", + "processInstanceId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "taskDefinitionKey": "approveInvoice", + "caseExecutionId": null, + "caseInstanceId": null, + "caseDefinitionId": null, + "suspended": false, + "formKey": "embedded:app:develop/invoice-forms/approve-invoice.html", + "tenantId": null, + "taskState": "aTaskState", + "attachment": false, + "comment": false + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator for variable\ncomparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/count": { + "get": { + "operationId": "getTasksCount", + "tags": [ + "Task" + ], + "summary": "Get List Count", + "description": "Retrieves the number of tasks that fulfill a provided filter. Corresponds to the size\nof the result set when using the [Get Tasks](https://docs.camunda.org/manual/7.22/reference/rest/task/) method.\n\n**Security Consideration:** There are several query parameters (such as\nassigneeExpression) for specifying an EL expression. These are disabled by default to\nprevent remote code execution. See the section on\n[security considerations](https://docs.camunda.org/manual/7.22/user-guide/process-engine/securing-custom-code/)\nfor custom code in the user guide for details.", + "parameters": [ + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to task with the given id." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with any of the given ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given id." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given ids." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given business key." + }, + { + "name": "processInstanceBusinessKeyExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given business key which \nis described by an expression. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with one of the give business keys. \nThe keys need to be in a comma-separated list." + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring." + }, + { + "name": "processInstanceBusinessKeyLikeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring and is described by an expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with one of the given keys. The \nkeys need to be in a comma-separated list." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + { + "name": "processDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process definition name that has the parameter value as \na substring." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to an execution with the given id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to case instances with the given id." + }, + { + "name": "caseInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to case instances with the given business key." + }, + { + "name": "caseInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a case instance business key that has the parameter value \nas a substring." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given id." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + { + "name": "caseDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + { + "name": "caseDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a case definition name that has the parameter value as a \nsubstring." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case execution with the given id." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated activity \ninstance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated \ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which belong to no tenant. Value may only be `true`, \nas `false` is the default behavior." + }, + { + "name": "assignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user is assigned to." + }, + { + "name": "assigneeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the user described by the given expression is assigned to. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "assigneeLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have an assignee that has the parameter \nvalue as a substring." + }, + { + "name": "assigneeLikeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have an assignee that has the parameter value described by the \ngiven expression as a substring. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "assigneeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which are assigned to one of the passed and \ncomma-separated user ids." + }, + { + "name": "assigneeNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which are not assigned to one of the passed and\ncomma-separated user ids." + }, + { + "name": "owner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user owns." + }, + { + "name": "ownerExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the user described by the given expression owns. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "candidateGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the given group." + }, + { + "name": "candidateGroupLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to groups that have the parameter value as a substring." + }, + { + "name": "candidateGroupExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the group described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "candidateUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the given user or to one of his groups." + }, + { + "name": "candidateUserExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the user described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "includeAssignedTasks", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Also include tasks that are assigned to users in candidate queries. Default is to only \ninclude tasks that are not assigned to any user if you query by candidate user or\ngroup(s)." + }, + { + "name": "involvedUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that the given user is involved in. A user is involved in a task if \nan identity link exists between task and user (e.g., the user is the assignee)." + }, + { + "name": "involvedUserExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that the user described by the given expression is involved in.\nA user is involved in a task if an identity link exists between task and user\n(e.g., the user is the assignee). See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + { + "name": "assigned", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + { + "name": "unassigned", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + { + "name": "taskDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given key." + }, + { + "name": "taskDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the given keys. The keys need to be in a\ncomma-separated list." + }, + { + "name": "taskDefinitionKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a key that has the parameter value as a substring." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given name." + }, + { + "name": "nameNotEqual", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that do not have the given name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + { + "name": "nameNotLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that do not have a name with the given parameter\nvalue as substring." + }, + { + "name": "description", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given description." + }, + { + "name": "descriptionLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a description that has the parameter\nvalue as a substring." + }, + { + "name": "priority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have the given priority." + }, + { + "name": "maxPriority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have a lower or equal priority." + }, + { + "name": "minPriority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have a higher or equal priority." + }, + { + "name": "dueDate", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "dueDateExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due on the date described by the given expression. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "dueAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.435+0200`." + }, + { + "name": "dueAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "dueBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.243+0200`." + }, + { + "name": "dueBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "withoutDueDate", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no due date. Value may only be `true`, \nas `false` is the default behavior." + }, + { + "name": "followUpDate", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.342+0200`." + }, + { + "name": "followUpDateExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date on the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ndate must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.542+0200`." + }, + { + "name": "followUpAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date after the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ndate must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.234+0200`." + }, + { + "name": "followUpBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date before the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpBeforeOrNotExistent", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have no followUp date or a followUp date before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.432+0200`. The\ntypical use case is to query all `active` tasks for a user for a given date." + }, + { + "name": "followUpBeforeOrNotExistentExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have no followUp date or a followUp date before the date\ndescribed by the given expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdOn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.324+0200`." + }, + { + "name": "createdOnExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created on the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.342+0200`." + }, + { + "name": "createdAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + { + "name": "createdBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "updatedAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were updated after the given date. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must\nhave the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + { + "name": "updatedAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were updated after the date described by the given expression. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "delegationState", + "in": "query", + "schema": { + "enum": [ + "PENDING", + "RESOLVED" + ], + "type": "string" + }, + "description": "Restrict to tasks that are in the given delegation state. Valid values are\n`PENDING` and `RESOLVED`." + }, + { + "name": "candidateGroups", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are offered to any of the given candidate groups. Takes a\ncomma-separated list of group names, so for example `developers,support,sales`." + }, + { + "name": "candidateGroupsExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are offered to any of the candidate groups described by the\ngiven expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to\n`java.util.List` of Strings." + }, + { + "name": "withCandidateGroups", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateGroups", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withCandidateUsers", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have a candidate user. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateUsers", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no candidate users. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "active", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include active tasks. Value may only be `true`, as `false`\nis the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include suspended tasks. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "taskVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that have variables with certain values. Variable filtering\nexpressions are comma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to process instances that have variables with certain \nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`;\n`notLike`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "caseInstanceVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to case instances that have variables with certain\nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable names in this query case-insensitively. If set\n`variableName` and `variablename` are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable values in this query case-insensitively. If set\n`variableValue` and `variablevalue` are treated as equal." + }, + { + "name": "parentTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all tasks that are sub tasks of the given task. Takes a task id." + }, + { + "name": "withCommentAttachmentInfo", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Check if task has attachments and/or comments. Value may only be `true`, as\n`false` is the default behavior.\nAdding the filter will do additional attachment and comments queries to the database,\nit might slow down the query in case of tables having high volume of data.\nThis param is not considered for count queries" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryTasksCount", + "tags": [ + "Task" + ], + "summary": "Get List Count (POST)", + "description": "Retrieves the number of tasks that fulfill the given filter. Corresponds to the size\nof the result set of the [Get Tasks (POST)](https://docs.camunda.org/manual/7.22/reference/rest/task/post-query/)\nmethod and takes the same parameters.\n\n**Security Consideration**:\nThere are several parameters (such as `assigneeExpression`) for specifying an EL\nexpression. These are disabled by default to prevent remote code execution. See the\nsection on\n[security considerations for custom code](https://docs.camunda.org/manual/7.22/user-guide/process-engine/securing-custom-code/)\nin the user guide for details.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task` Request Body 1", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "processInstanceBusinessKeyIn": "aBusinessKey,anotherBusinessKey", + "assigneeIn": "anAssignee,anotherAssignee", + "priority": 10, + "sorting": [ + { + "sortBy": "dueDate", + "sortOrder": "asc" + }, + { + "sortBy": "processVariable", + "sortOrder": "desc", + "parameters": { + "variable": "orderId", + "type": "String" + } + } + ] + } + }, + "example-2": { + "summary": "POST `/task` Request Body 2", + "description": "Logical query: assignee \u003d \"John Munda\" AND (name \u003d \"Approve Invoice\" OR priority \u003d 5) AND (suspended \u003d false OR taskDefinitionKey \u003d \"approveInvoice\")", + "value": { + "assignee": "John Munda", + "orQueries": [ + { + "name": "Approve Invoice", + "priority": 5 + }, + { + "suspended": false, + "taskDefinitionKey": "approveInvoice" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/create": { + "post": { + "operationId": "createTask", + "tags": [ + "Task" + ], + "summary": "Create", + "description": "Creates a new task.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskDto" + }, + "examples": { + "example-1": { + "summary": "POST /task/create", + "value": { + "id": "aTaskId", + "name": "My Task", + "description": "This have to be done very urgent", + "priority": 30, + "assignee": "peter", + "owner": "mary", + "delegationState": "PENDING", + "due": "2014-08-30T10:00:00.000+0200", + "followUp": "2014-08-25T10:00:00.000+0200", + "parentTaskId": "aParentTaskId", + "caseInstanceId": "aCaseInstanceId", + "tenantId": null + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if a not valid `delegationState` is supplied. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/report/candidate-group-count": { + "get": { + "operationId": "getTaskCountByCandidateGroup", + "tags": [ + "Task" + ], + "summary": "Get Task Count By Candidate Group", + "description": "Retrieves the number of tasks for each candidate group.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskCountByCandidateGroupResultDto" + } + }, + "examples": { + "example-1": { + "value": [ + { + "groupName": null, + "taskCount": 1 + }, + { + "groupName": "aGroupName", + "taskCount": 2 + }, + { + "groupName": "anotherGroupName", + "taskCount": 3 + } + ] + } + } + }, + "application/csv": { + "schema": {} + }, + "text/csv": { + "schema": {} + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid or mandatory parameters are not supplied. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the authenticated user is unauthorized to read the history. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}": { + "delete": { + "operationId": "deleteTask", + "tags": [ + "Task" + ], + "summary": "Delete", + "description": "Removes a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to be removed." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request. The Task with the given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The Task with the given id cannot be deleted because it is part of a running process or case instance.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for\nthe error response format." + } + } + }, + "get": { + "operationId": "getTask", + "tags": [ + "Task" + ], + "summary": "Get", + "description": "Retrieves a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskWithAttachmentAndCommentDto" + }, + "examples": { + "example-1": { + "summary": "GET /task/anId Response", + "value": { + "id": "anId", + "name": "aName", + "assignee": "anAssignee", + "created": "2013-01-23T13:42:42.000+0200", + "due": "2013-01-23T13:49:42.576+0200", + "followUp": "2013-01-23T13:44:42.437+0200", + "delegationState": "RESOLVED", + "description": "aDescription", + "executionId": "anExecution", + "owner": "anOwner", + "parentTaskId": "aParentId", + "priority": 42, + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "taskDefinitionKey": "aTaskDefinitionKey", + "suspended": false, + "formKey": "aFormKey", + "camundaFormRef": { + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "taskState": "aTaskState" + } + }, + "example-2": { + "summary": "GET /task/anId?withCommentAttachmentInfo\u003dtrue Response", + "value": [ + { + "id": "349fffa8-6571-11e7-9a44-d6940f5ef88d", + "name": "Approve Invoice", + "assignee": "John Munda", + "created": "2017-07-10T15:10:54.670+0200", + "due": "2017-07-17T15:10:54.670+0200", + "followUp": null, + "lastUpdated": "2017-07-17T15:10:54.670+0200", + "delegationState": null, + "description": "Approve the invoice (or not).", + "executionId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "invoice:1:2c8d8057-6571-11e7-9a44-d6940f5ef88d", + "processInstanceId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "taskDefinitionKey": "approveInvoice", + "caseExecutionId": null, + "caseInstanceId": null, + "caseDefinitionId": null, + "suspended": false, + "formKey": "embedded:app:develop/invoice-forms/approve-invoice.html", + "tenantId": null, + "taskState": "aTaskState", + "attachment": false, + "comment": false + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "updateTask", + "tags": [ + "Task" + ], + "summary": "Update", + "description": "Updates a task.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskDto" + }, + "examples": { + "example-1": { + "summary": "PUT /task/aTaskId/ Response", + "value": { + "name": "My Task", + "description": "This have to be done very urgent", + "priority": 30, + "assignee": "peter", + "owner": "mary", + "delegationState": "PENDING", + "due": "2014-08-30T10:00:00.000+0200", + "followUp": "2014-08-25T10:00:00.000+0200", + "parentTaskId": "aParentTaskId", + "caseInstanceId": "aCaseInstanceId", + "tenantId": "tenantId" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if a not valid `delegationState` is supplied. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the corresponding task cannot be found." + } + } + } + }, + "/task/{id}/assignee": { + "post": { + "operationId": "setAssignee", + "tags": [ + "Task" + ], + "summary": "Set Assignee", + "description": "Changes the assignee of a task to a specific user.\n\n**Note:** The difference with the [Claim Task](https://docs.camunda.org/manual/7.22/reference/rest/task/post-claim/)\nmethod is that this method does not check if the task already has a user\nassigned to it.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to set the assignee for." + } + ], + "requestBody": { + "description": "Provide the id of the user that will be the assignee of the task.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserIdDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/assignee`", + "value": { + "userId": "aUserId" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist or setting the assignee was not successful.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/attachment": { + "get": { + "operationId": "getAttachments", + "tags": [ + "Task Attachment" + ], + "summary": "Get List", + "description": "Gets the attachments for a task.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the attachments for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttachmentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/attachment", + "value": [ + { + "id": "attachmentId", + "name": "attachmentName", + "taskId": "aTaskId", + "description": "attachmentDescription", + "type": "attachmentType", + "url": "http://my-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "anotherAttachmentId", + "name": "anotherAttachmentName", + "taskId": "aTaskId", + "description": "anotherAttachmentDescription", + "type": "anotherAttachmentType", + "url": "http://my-another-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "yetAnotherAttachmentId", + "name": "yetAnotherAttachmentName", + "taskId": "aTaskId", + "description": "yetAnotherAttachmentDescription", + "type": "yetAnotherAttachmentType", + "url": "http://yet-another-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No task exists for the given task id. See the [Introduction](/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/attachment/create": { + "post": { + "operationId": "addAttachment", + "tags": [ + "Task Attachment" + ], + "summary": "Create", + "description": "Creates an attachment for a task.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to add the attachment to." + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormAttachmentDto" + }, + "examples": { + "example-1": { + "summary": "POST /task/aTaskId/attachment/create", + "description": "Post data for a new task attachment.", + "value": "------------------------------925df49a954b\n Content-Disposition: form-data; name\u003d\"url\"\n\n http://my-attachment-content-url.de\n ------------------------------925df49a954b\n Content-Disposition: form-data; name\u003d\"attachment-name\"\n\n attachmentName\n ------------------------------925df49a954b\n Content-Disposition: form-data; name\u003d\"attachment-description\"\n\n attachmentDescription\n ------------------------------925df49a954b\n Content-Disposition: form-data; name\u003d\"attachment-type\"\n\n attachmentType\n ------------------------------925df49a954b--" + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "attachmentId", + "name": "attachmentName", + "taskId": "aTaskId", + "description": "attachmentDescription", + "type": "attachmentType", + "url": "http://my-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/task/aTaskId/attachment/aTaskAttachmentId", + "rel": "self" + } + ] + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The task does not exists or task id is null. No content or url to remote content exists. See the\n[Introduction](/reference/rest/overview/#error-handling) for the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The history of the engine is disabled. See the [Introduction](/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/attachment/{attachmentId}": { + "delete": { + "operationId": "deleteAttachment", + "tags": [ + "Task Attachment" + ], + "summary": "Delete", + "description": "Removes an attachment from a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task." + }, + { + "name": "attachmentId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the attachment to be removed." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The history of the engine is disabled. See the [Introduction](/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "A Task Attachment for the given task id and attachment id does not exist. See the\n[Introduction](/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getAttachment", + "tags": [ + "Task Attachment" + ], + "summary": "Get", + "description": "Retrieves a task attachment by task id and attachment id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task." + }, + { + "name": "attachmentId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the attachment to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentDto" + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/attachment/aTaskAttachmentId", + "value": { + "id": "attachmentId", + "name": "attachmentName", + "taskId": "aTaskId", + "description": "attachmentDescription", + "type": "attachmentType", + "url": "http://my-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/task/aTaskId/attachment/aTaskAttachmentId", + "rel": "self" + } + ] + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The attachment for the given task and attachment id does not exist or the history of the engine is\ndisabled.\n\nSee the [Introduction](/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/task/{id}/attachment/{attachmentId}/data": { + "get": { + "operationId": "getAttachmentData", + "tags": [ + "Task Attachment" + ], + "summary": "Get (Binary)", + "description": "Retrieves the binary content of a task attachment by task id and attachment id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task." + }, + { + "name": "attachmentId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the attachment to be retrieved." + } + ], + "responses": { + "200": { + "description": "Request successful.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For files without any MIME type information, a byte stream is returned." + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information are returned as the saved type. Additionally, for file\n responses, the Content-Disposition header will be set." + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The attachment content for the given task id and attachment id does not exist, or the history of the\nengine is disabled.\n\nSee the [Introduction](/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/task/{id}/bpmnError": { + "post": { + "operationId": "handleBpmnError", + "tags": [ + "Task" + ], + "summary": "Handle BPMN Error", + "description": "Reports a business error in the context of a running task by id. The error code must\nbe specified to identify the BPMN error handler. See the documentation for\n[Reporting Bpmn Error](https://docs.camunda.org/manual/7.22/reference/bpmn20/tasks/user-task/#reporting-bpmn-error)\nin User Tasks.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task a BPMN error is reported for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskBpmnErrorDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/aTaskId/bpmnError`", + "value": { + "errorCode": "bpmn-error-543", + "errorMessage": "anErrorMessage", + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the `errorCode` or `id` are not present in the request. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "If the authenticated user is unauthorized to update the task. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/bpmnEscalation": { + "post": { + "operationId": "handleEscalation", + "tags": [ + "Task" + ], + "summary": "Handle BPMN Escalation", + "description": "Reports an escalation in the context of a running task by id. The escalation code must\nbe specified to identify the escalation handler. See the documentation for\n[Reporting Bpmn Escalation](https://docs.camunda.org/manual/7.22/reference/bpmn20/tasks/user-task/#reporting-bpmn-escalation)\nin User Tasks.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task in which context a BPMN escalation is reported." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskEscalationDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/aTaskId/bpmnEscalation`", + "value": { + "escalationCode": "bpmn-escalation-432", + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the \u003ccode\u003eescalationCode\u003c/code\u003e is not provided in\nthe request. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "If the authenticated user is unauthorized to update the process instance. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/claim": { + "post": { + "operationId": "claim", + "tags": [ + "Task" + ], + "summary": "Claim", + "description": "Claims a task for a specific user.\n\n**Note:** The difference with the\n[Set Assignee](https://docs.camunda.org/manual/7.22/reference/rest/task/post-assignee/)\nmethod is that here a check is performed to see if the task already has a user\nassigned to it.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to claim." + } + ], + "requestBody": { + "description": "Provide the id of the user that claims the task.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserIdDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/claim`", + "value": { + "userId": "aUserId" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist or claiming was not successful. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/comment": { + "get": { + "operationId": "getComments", + "tags": [ + "Task Comment" + ], + "summary": "Get List", + "description": "Gets the comments for a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the comments for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/comment", + "value": [ + { + "id": "commentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-01-02T21:37:03.764+0200", + "message": "message", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "anotherCommentId", + "userId": "anotherUserId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-02-23T20:37:43.975+0200", + "message": "anotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "yetAnotherCommentId", + "userId": "yetAnotherUserId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-04-21T10:15:23.764+0200", + "message": "yetAnotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No task exists for the given task id. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/comment/create": { + "post": { + "operationId": "createComment", + "tags": [ + "Task Comment" + ], + "summary": "Create", + "description": "Creates a comment for a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to add the comment to." + } + ], + "requestBody": { + "description": "**Note:** Only the `message` and `processInstanceId` properties will be used. Every other property passed to this endpoint will be ignored.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentDto" + }, + "examples": { + "example-1": { + "summary": "POST /task/aTaskId/comment/create", + "value": { + "message": "a task comment", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/task/aTaskId/comment/aTaskCommentId", + "rel": "self" + } + ], + "id": "aTaskCommentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-01-02T21:37:03.887+0200", + "message": "comment message", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The task does not exist or no comment message was submitted. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The history of the engine is disabled. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/comment/{commentId}": { + "get": { + "operationId": "getComment", + "tags": [ + "Task Comment" + ], + "summary": "Get", + "description": "Retrieves a task comment by task id and comment id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task." + }, + { + "name": "commentId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the comment to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentDto" + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/comment", + "value": { + "id": "aTaskCommentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-01-02T21:37:03.664+0200", + "message": "comment content", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The task or comment with given task and comment id does not exist, or the history of\nthe engine is disabled. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/complete": { + "post": { + "operationId": "complete", + "tags": [ + "Task" + ], + "summary": "Complete", + "description": "Completes a task and updates process variables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to complete." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompleteTaskDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/anId/complete`", + "description": "Complete Task with variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + }, + "withVariablesInReturn": true + } + }, + "example-2": { + "summary": "POST `/task/anId/complete`", + "description": "Complete Task without variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/task/anId/complete`", + "description": "Response Body", + "value": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + } + } + } + } + }, + "description": "Request successful. The response contains the process variables." + }, + "204": { + "description": "Request successful. The response contains no variables." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the task does not exist or the corresponding process instance could not be\nresumed successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/delegate": { + "post": { + "operationId": "delegateTask", + "tags": [ + "Task" + ], + "summary": "Delegate", + "description": "Delegates a task to another user.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to delegate." + } + ], + "requestBody": { + "description": "Provide the id of the user that the task should be delegated to.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserIdDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/delegate`", + "value": { + "userId": "aUserId" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the task does not exist or delegation was not successful. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/deployed-form": { + "get": { + "operationId": "getDeployedForm", + "tags": [ + "Task" + ], + "summary": "Get Deployed Form", + "description": "Retrieves the deployed form that is referenced from a given task. For further\ninformation please refer to the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#embedded-task-forms).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to get the deployed form for." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET `/task/taskId/deployed-form`", + "value": "\u003cform role\u003d\"form\" name\u003d\"invoiceForm\"\n class\u003d\"form-horizontal\"\u003e\n \u003cdiv class\u003d\"form-group\"\u003e\n \u003clabel class\u003d\"control-label col-md-4\"\n for\u003d\"creditor\"\u003eCreditor\u003c/label\u003e\n \u003cdiv class\u003d\"col-md-8\"\u003e\n \u003cinput cam-variable-name\u003d\"creditor\"\n cam-variable-type\u003d\"String\"\n id\u003d\"creditor\"\n class\u003d\"form-control\"\n type\u003d\"text\"\n required /\u003e\n \u003cdiv class\u003d\"help\"\u003e\n (e.g. \u0026quot;Great Pizza for Everyone Inc.\u0026quot;)\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/form\u003e" + } + } + }, + "application/json": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/json` Responses, a byte stream is returned." + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The form key has wrong format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The deployed form cannot be retrieved due to missing permissions on task resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No deployed form for a given task exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/form": { + "get": { + "operationId": "getForm", + "tags": [ + "Task" + ], + "summary": "Get Form Key", + "description": "Retrieves the form key for a task. The form key corresponds to the `FormData#formKey`\nproperty in the engine. This key can be used to do task-specific form rendering in\nclient applications. Additionally, the context path of the containing process\napplication is returned.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the form for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `/task/anId/form`", + "value": { + "key": "aFormKey", + "contextPath": "http://localhost:8080/my-process-application/" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/form-variables": { + "get": { + "operationId": "getFormVariables", + "tags": [ + "Task" + ], + "summary": "Get Task Form Variables", + "description": "Retrieves the form variables for a task. The form variables take form data specified\non the task into account. If form fields are defined, the variable types and default\nvalues of the form fields are taken into account.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variables for." + }, + { + "name": "variableNames", + "in": "query", + "schema": { + "type": "string" + }, + "description": "A comma-separated list of variable names. Allows restricting the list of requested\nvariables to the variable names in the list. It is best practice to restrict the\nlist of variables to the variables actually required by the form in order to\nminimize fetching of data. If the query parameter is ommitted all variables are\nfetched. If the query parameter contains non-existent variable names, the variable\nnames are ignored." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store\ncustom Java objects) should be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and\ntransformed to JSON using [Jackson\u0027s](http://jackson.codehaus.org/) POJO/bean\nproperty introspection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string\ncontaining XML.\n\nNote: While true is the default value for reasons of backward compatibility, we\nrecommend setting this parameter to false when developing web applications that are\nindependent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `/task/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + } + } + } + } + }, + "description": "Request successful. A JSON object containing a property for each variable returned." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": " id is null or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/identity-links": { + "get": { + "operationId": "getIdentityLinks", + "tags": [ + "Task Identity Link" + ], + "summary": "Get List", + "description": "Gets the identity links for a task by id, which are the users and groups that are in\n*some* relation to it (including assignee and owner).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the identity links for." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of links to include." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IdentityLinkDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /task/anId/identityLinks", + "value": [ + { + "userId": "userId", + "groupId": null, + "type": "assignee" + }, + { + "userId": null, + "groupId": "groupId1", + "type": "candidate" + }, + { + "userId": null, + "groupId": "groupId2", + "type": "candidate" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "post": { + "operationId": "addIdentityLink", + "tags": [ + "Task Identity Link" + ], + "summary": "Add", + "description": "Adds an identity link to a task by id. Can be used to link any user or group to a task\nand specify a relation.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to add a link to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentityLinkDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/anId/identity-links`", + "value": { + "groupId": "aNewGroupId", + "type": "candidate" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/task/{id}/identity-links/delete": { + "post": { + "operationId": "deleteIdentityLink", + "tags": [ + "Task Identity Link" + ], + "summary": "Delete", + "description": "Removes an identity link from a task by id", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to remove a link from." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentityLinkDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/anId/identityLinks/delete`", + "value": { + "groupId": "theOldGroupId", + "type": "candidate" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for\nthe error response format." + } + } + } + }, + "/task/{id}/localVariables": { + "get": { + "operationId": "getTaskLocalVariables", + "tags": [ + "Task Local Variable" + ], + "summary": "Get Local Task Variables", + "description": "Retrieves all variables of a given task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variables from." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on the server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward compatibility, we recommend setting this\nparameter to `false` when developing web applications that are independent of the Java process\napplications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/task/aTaskId/variables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }, + "example-2": { + "summary": "GET `/task/aTaskId/variables?deserializeValue\u003dfalse`", + "value": { + "aVariableKey": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "modifyTaskLocalVariables", + "tags": [ + "Task Local Variable" + ], + "summary": "Update/Delete Local Task Variables", + "description": "Updates or deletes the variables in the context of a task. Updates precede deletions. So, if a variable is\nupdated AND deleted, the deletion overrides the update.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to set variables for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchVariablesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/aTaskId/variables`", + "description": "Status 204 Response: No content.", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid. For example the value could not be parsed to an `Integer` value\nor the passed variable type is not supported. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Update or delete could not be executed because the task is `null` or does not exist.. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/localVariables/{varName}": { + "delete": { + "operationId": "deleteTaskLocalVariable", + "tags": [ + "Task Local Variable" + ], + "summary": "Delete Local Task Variable", + "description": "Removes a local variable from a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to delete the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to be removed." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getTaskLocalVariable", + "tags": [ + "Task Local Variable" + ], + "summary": "Get Local Task Variable", + "description": "Retrieves a variable from the context of a given task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to get" + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on the server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\nNote: While `true` is the default value for reasons of backward compatibility, we recommend setting this\nparameter to `false` when developing web applications that are independent of the Java process\napplications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "GET `/task/aTaskId/variables/myObject123`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }, + "example-2": { + "summary": "GET `/task/aTaskId/variables/myObject123?deserializeValue\u003dfalse`", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "putTaskLocalVariable", + "tags": [ + "Task Local Variable" + ], + "summary": "Update Local Task Variable", + "description": "Sets a variable in the context of a given task.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to set the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to set." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "someValue", + "type": "String" + } + }, + "example-2": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "An Object Variable PUT Request. Status 204. No content.", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable name, value or type is invalid, for example if the value could not be parsed to an `Integer`\nvalue or the passed variable type is not supported or a new transient variable has the name that is\nalready persisted. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable name is `null`, or the Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/localVariables/{varName}/data": { + "get": { + "operationId": "getTaskLocalVariableBinary", + "tags": [ + "Task Local Variable" + ], + "summary": "Get Local Task Variable (Binary)", + "description": "Retrieves a binary variable from the context of a given task by id. Applicable for byte array and file\nvariables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "responses": { + "200": { + "description": "Request successful.\n For binary variables or files without any MIME type information, a byte stream is returned.\n File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "binary variable: Status 200. Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "file variable: Status 200. Content-Type: text/plain; charset\u003dUTF-8. Content-Disposition: attachment; filename\u003d\"someFile.txt\"" + } + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id exists but is not a binary variable.See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "setBinaryTaskLocalVariable", + "tags": [ + "Task Local Variable" + ], + "summary": "Update Local Task Variable (Binary)", + "description": "Sets the serialized value for a binary variable or the binary value for a file variable.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "requestBody": { + "description": "For binary variables a multipart form submit with the following parts:", + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormVariableBinaryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (1)", + "description": "Post binary content of a byte array variable.", + "value": "\n ```\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"image.png\"\n Content-Type: application/octet-stream\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n Bytes\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-2": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (2)", + "description": "Post the JSON serialization of a Java Class (**deprecated**).", + "value": "\n ```\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"type\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n java.util.ArrayList\u003cjava.lang.Object\u003e\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"data\"\n Content-Type: application/json; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n [\"foo\",\"bar\"]\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-3": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (3)", + "description": "Post a text file.", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"myFile.txt\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n File\n ------------------------------1e838f8f632a--\n ```\n " + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if no filename is set. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable name is `null`, or the Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/rendered-form": { + "get": { + "operationId": "getRenderedForm", + "tags": [ + "Task" + ], + "summary": "Get Rendered Form", + "description": "Retrieves the rendered form for a task. This method can be used to get the HTML\nrendering of a\n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to get the rendered form for." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "A `/task/anId/rendered-form` HTML GET response body providing the rendered (generated) form content.", + "value": "\u003cform class\u003d\"form-horizontal\"\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eCustomer ID\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"string\" name\u003d\"customerId\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eAmount\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"number\" name\u003d\"amount\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The task with the given id does not exist or has no form field metadata defined for\nthis task. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/resolve": { + "post": { + "operationId": "resolve", + "tags": [ + "Task" + ], + "summary": "Resolve", + "description": "Resolves a task and updates execution variables.\n\nResolving a task marks that the assignee is done with the task delegated to them, and\nthat it can be sent back to the owner. Can only be executed when the task has been\ndelegated. The assignee will be set to the owner, who performed the delegation.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to resolve." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompleteTaskDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/resolve`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the task does not exist or the corresponding process instance could not be\nresumed successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/submit-form": { + "post": { + "operationId": "submit", + "tags": [ + "Task" + ], + "summary": "Submit Form", + "description": "Completes a task and updates process variables using a form submit. There are two\ndifference between this method and the `complete` method:\n\n* If the task is in state `PENDING` - i.e., has been delegated before, it is not\ncompleted but resolved. Otherwise it will be completed.\n* If the task has Form Field Metadata defined, the process engine will perform backend\nvalidation for any form fields which have validators defined.\nSee the\n[Generated Task Forms](https://docs.camunda.org/manual/7.22/user-guide/task-forms/_index/#generated-task-forms)\nsection of the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/) for more information.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to submit the form for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompleteTaskDto" + }, + "examples": { + "example-1": { + "summary": "Request Body 1", + "description": "POST `/task/anId/submit-form`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + }, + "aFileVariable": { + "value": "TG9yZW0gaXBzdW0\u003d", + "type": "File", + "valueInfo": { + "filename": "myFile.txt" + } + } + } + } + }, + "example-2": { + "summary": "Request Body 2", + "description": "POST `/task/anId/complete`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + }, + "withVariablesInReturn": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "Response Body", + "description": "Response of a submitted task form with variables in return", + "value": { + "aVariable": { + "value": "aStringValue", + "type": "String", + "valueInfo": {} + }, + "anotherVariable": { + "value": 42, + "type": "Integer", + "valueInfo": {} + }, + "aThirdVariable": { + "value": true, + "type": "Boolean", + "valueInfo": {} + } + } + } + } + } + }, + "description": "Request successful. The response contains the process variables." + }, + "204": { + "description": "Request successful. The response contains no variables." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed to an Integer value\nor the passed variable type is not supported.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for\nthe error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the task does not exist or the corresponding process instance could not be resumed successfully.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for\nthe error response format." + } + } + } + }, + "/task/{id}/unclaim": { + "post": { + "operationId": "unclaim", + "tags": [ + "Task" + ], + "summary": "Unclaim", + "description": "Resets a task\u0027s assignee. If successful, the task is not assigned to a user.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to unclaim." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The Task with the given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/variables": { + "get": { + "operationId": "getTaskVariables", + "tags": [ + "Task Variable" + ], + "summary": "Get Task Variables", + "description": "Retrieves all variables visible from the task. A variable is visible from the task if it is a local task\nvariable or declared in a parent scope of the task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variables from." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on the server side (default `true`).\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\nNote: While `true` is the default value for reasons of backward compatibility, we recommend setting this\nparameter to `false` when developing web applications that are independent of the Java process\napplications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/task/aTaskId/variables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }, + "example-2": { + "summary": "GET `/task/aTaskId/variables?deserializeValue\u003dfalse`", + "value": { + "aVariableKey": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "modifyTaskVariables", + "tags": [ + "Task Variable" + ], + "summary": "Update/Delete Task Variables", + "description": "Updates or deletes the variables visible from the task. Updates precede deletions. So, if a variable is\nupdated AND deleted, the deletion overrides the update. A variable is visible from the task if it is a\nlocal task variable or declared in a parent scope of the task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to set variables for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchVariablesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/aTaskId/variables`", + "description": "Status 204 Response: No content.", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid. For example the value could not be parsed to an `Integer` value\nor the passed variable type is not supported. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Update or delete could not be executed because the task is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/variables/{varName}": { + "delete": { + "operationId": "deleteTaskVariable", + "tags": [ + "Task Variable" + ], + "summary": "Delete Task Variable", + "description": "Removes a variable that is visible to a task. A variable is visible to a task if it is a local task\nvariable or declared in a parent scope of the task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to delete the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to be removed." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is null or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getTaskVariable", + "tags": [ + "Task Variable" + ], + "summary": "Get Task Variable", + "description": "Retrieves a variable from the context of a given task.\nThe variable must be visible from the task. It is visible from the task if it is a local task variable or\ndeclared in a parent scope of the task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to get." + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on the server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\nNote: While `true` is the default value for reasons of backward compatibility, we recommend setting this\nparameter to `false` when developing web applications that are independent of the Java process\napplications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "GET `/task/aTaskId/variables/myObject123`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }, + "example-2": { + "summary": "GET `/task/aTaskId/variables/myObject123?deserializeValue\u003dfalse`", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "putTaskVariable", + "tags": [ + "Task Variable" + ], + "summary": "Update Task Variable", + "description": "Updates a process variable that is visible from the Task scope. A variable is visible from the task if it\nis a local task variable, or declared in a parent scope of the task. See the documentation on\n[variable scopes and visibility](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables#variable-scopes-and-variable-visibility).\n\n**Note**: If a variable doesn\u0027t exist, the variable is created in the top-most scope\nvisible from the task.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to set the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to set." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "someValue", + "type": "String" + } + }, + "example-2": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable name, value or type is invalid, for example if the value could not be parsed to an `Integer`\nvalue or the passed variable type is not supported or a new transient variable has the name that is\nalready persisted. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable name is `null`, or the Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/variables/{varName}/data": { + "get": { + "operationId": "getTaskVariableBinary", + "tags": [ + "Task Variable" + ], + "summary": "Get Task Variable (Binary)", + "description": "Retrieves a binary variable from the context of a given task. Applicable for byte array and file\nvariables. The variable must be visible from the task. It is visible from the task if it is a local task\nvariable or declared in a parent scope of the task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "responses": { + "200": { + "description": "Request successful.\n For binary variables or files without any MIME type information, a byte stream is returned.\n File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "binary variable: Status 200. Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "file variable: Status 200. Content-Type: text/plain; charset\u003dUTF-8. Content-Disposition: attachment; filename\u003d\"someFile.txt\"" + } + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id exists but is not a binary variable.See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "setBinaryTaskVariable", + "tags": [ + "Task Variable" + ], + "summary": "Update Task Variable (Binary)", + "description": "Sets the serialized value for a binary variable or the binary value for a file variable visible from the\ntask. A variable is visible from the task if it is a local task variable or declared in a parent scope of\nthe task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "requestBody": { + "description": "For binary variables a multipart form submit with the following parts:", + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormVariableBinaryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (1)", + "description": "Post binary content of a byte array variable.", + "value": "\n ```\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"image.png\"\n Content-Type: application/octet-stream\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n Bytes\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-2": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (2)", + "description": "Post the JSON serialization of a Java Class (**deprecated**).", + "value": "\n ```\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"type\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n java.util.ArrayList\u003cjava.lang.Object\u003e\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"data\"\n Content-Type: application/json; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n [\"foo\",\"bar\"]\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-3": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (3)", + "description": "Post a text file.", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"myFile.txt\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n File\n ------------------------------1e838f8f632a--\n ```\n " + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if no filename is set. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable name is `null`, or the Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/telemetry/configuration": { + "get": { + "operationId": "getTelemetryConfiguration", + "tags": [ + "Telemetry" + ], + "summary": "Fetch Telemetry Configuration", + "description": "Fetches Telemetry Configuration.", + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TelemetryConfigurationDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": { + "enableTelemetry": true + } + } + } + } + }, + "description": "Request successful." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the user who perform the operation is not a \u003cb\u003ecamunda-admin\u003c/b\u003e user." + } + } + }, + "post": { + "deprecated": true, + "operationId": "configureTelemetry", + "tags": [ + "Telemetry" + ], + "summary": "Configure Telemetry", + "description": "Deprecated: The sending telemetry feature is removed. Please remove the endpoint usages as they are no longer needed.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TelemetryConfigurationDto" + }, + "examples": { + "examle-1": { + "summary": "POST /telemetry/configuration", + "description": "The content of the Request Body", + "value": { + "enableTelemetry": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the user who perform the operation is not a \u003cb\u003ecamunda-admin\u003c/b\u003e user." + } + } + } + }, + "/telemetry/data": { + "get": { + "deprecated": true, + "operationId": "getTelemetryData", + "tags": [ + "Telemetry" + ], + "summary": "Fetch Telemetry Data", + "description": "Deprecated: Always returns false. The sending telemetry feature is removed. Please remove the endpoint usages as they are no longer needed.", + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TelemetryDataDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": { + "installation": "8343cc7a-8ad1-42d4-97d2-43452c0bdfa3", + "product": { + "name": "Camunda BPM Runtime", + "version": "7.14.0", + "edition": "enterprise", + "internals": { + "database": { + "vendor": "h2", + "version": "1.4.190 (2015-10-11)" + }, + "application-server": { + "vendor": "Wildfly", + "version": "WildFly Full 19.0.0.Final (WildFly Core 11.0.0.Final) - 2.0.30.Final" + }, + "jdk": { + "version": "14.0.2", + "vendor": "Oracle Corporation" + }, + "commands": { + "StartProcessInstanceCmd": { + "count": 40 + }, + "FetchExternalTasksCmd": { + "count": 100 + } + }, + "metrics": { + "process-instances": { + "count": 936 + }, + "flow-node-instances": { + "count": 6125 + }, + "decision-instances": { + "count": 140 + }, + "executed-decision-elements": { + "count": 732 + } + }, + "data-collection-start-date": "2022-11-320T15:53:20.386+0100", + "camunda-integration": [ + "spring-boot-starter", + "camunda-bpm-run" + ], + "license-key": { + "customer": "customer name", + "type": "UNIFIED", + "valid-until": "2022-09-30", + "unlimited": false, + "features": { + "camundaBPM": "true" + }, + "raw": "customer\u003dcustomer name;expiryDate\u003d2022-09-30;camundaBPM\u003dtrue;optimize\u003dfalse;cawemo\u003dfalse" + }, + "webapps": [ + "cockpit", + "admin" + ] + } + } + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/tenant": { + "get": { + "operationId": "queryTenants", + "tags": [ + "Tenant" + ], + "summary": "Get Tenants", + "description": "Query for a list of tenants using a list of parameters. The size of the result set\ncan be retrieved by using the [Get Tenant\nCount](https://docs.camunda.org/manual/7.22/reference/rest/tenant/get-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "id", + "name" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the tenant." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the tenant." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "userMember", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only tenants where the given user is a member of." + }, + { + "name": "groupMember", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only tenants where the given group is a member of." + }, + { + "name": "includingGroupsOfUser", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Select only tenants where the user or one of his groups is a member of.\nCan only be used in combination with the `userMember` parameter. Value may only be `true`,\nas `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/tenant?name\u003dtenantOne`", + "value": [ + { + "id": "tenantOne", + "name": "Tenant One" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy` is specified. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableTenantResourceOperations", + "tags": [ + "Tenant" + ], + "summary": "Tenant Resource Options", + "description": "The `/tenant` resource supports two custom OPTIONS requests, this one for the resource\nas such and one for individual tenant instances. The OPTIONS request\nallows checking for the set of available operations that the currently\nauthenticated user can perform on the `/tenant` resource. If the user\ncan perform an operation or not may depend on various things,\nincluding the users authorizations to interact with this resource and\nthe internal configuration of the process engine.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/tenant", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/tenant/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/tenant/create", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/tenant/count": { + "get": { + "operationId": "getTenantCount", + "tags": [ + "Tenant" + ], + "summary": "Get Tenant Count", + "description": "Query for tenants using a list of parameters and retrieves the count.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the tenant." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the tenant." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "userMember", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only tenants where the given user is a member of." + }, + { + "name": "groupMember", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only tenants where the given group is a member of." + }, + { + "name": "includingGroupsOfUser", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Select only tenants where the user or one of his groups is a member of.\nCan only be used in combination with the `userMember` parameter. Value may only be `true`,\nas `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/tenant/count?name\u003dtenantOne`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/tenant/create": { + "post": { + "operationId": "createTenant", + "tags": [ + "Tenant" + ], + "summary": "Create Tenant", + "description": "Create a new tenant.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantDto" + }, + "examples": { + "example-1": { + "summary": "POST `/tenant/create`", + "value": { + "id": "tenantOne", + "name": "Tenant One" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The tenant could not be created due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/tenant/{id}": { + "delete": { + "operationId": "deleteTenant", + "tags": [ + "Tenant" + ], + "summary": "Delete Tenant", + "description": "Deletes a tenant by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Tenant cannot be found. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getTenant", + "tags": [ + "Tenant" + ], + "summary": "Get Tenant", + "description": "Retrieves a tenant.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/tenant/tenantOne`", + "value": { + "id": "tenantOne", + "name": "Tenant One" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Tenant with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableTenantInstanceOperations", + "tags": [ + "Tenant" + ], + "summary": "Tenant Resource Options", + "description": "The `/tenant` resource supports two custom OPTIONS requests, one for the resource as such and this one for\nindividual tenant instances. The OPTIONS request allows checking for the set of available operations that\nthe currently authenticated user can perform on the `/tenant/{id}` resource. If the user can perform an\noperation or not may depend on various things, including the users authorizations to interact with this\nresource and the internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant/tenantOne`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne", + "rel": "self" + }, + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne", + "rel": "update" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + }, + "put": { + "operationId": "updateTenant", + "tags": [ + "Tenant" + ], + "summary": "Update Tenant", + "description": "Updates a given tenant.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/tenant/tenantOne`", + "value": { + "id": "tenantOne", + "name": "Tenant One" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the tenant with the requested Id cannot be found." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The tenant could not be updated due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/tenant/{id}/group-members": { + "options": { + "operationId": "availableTenantGroupMembersOperations", + "tags": [ + "Tenant" + ], + "summary": "Tenant Group Membership Resource Options", + "description": "The OPTIONS request allows checking for the set of available operations that the\ncurrently authenticated user can perform on the resource. If the user\ncan perform an operation or not may depend on various things,\nincluding the users authorizations to interact with this resource and\nthe internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant/tenantOne/group-members`", + "value": { + "links": [ + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/group-members", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/group-members", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/tenant/{id}/group-members/{groupId}": { + "delete": { + "operationId": "deleteGroupMembership", + "tags": [ + "Tenant" + ], + "summary": "Create Tenant Group Membership", + "description": "Creates a membership between a tenant and a group.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant." + }, + { + "name": "groupId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an internal error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "createGroupMembership", + "tags": [ + "Tenant" + ], + "summary": "Create Tenant Group Membership", + "description": "Creates a membership between a tenant and a group.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant." + }, + { + "name": "groupId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an internal error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/tenant/{id}/user-members": { + "options": { + "operationId": "availableTenantUserMembersOperations", + "tags": [ + "Tenant" + ], + "summary": "Tenant User Membership Resource Options", + "description": "The OPTIONS request allows checking for the set of available operations that the\ncurrently authenticated user can perform on the resource. If the user\ncan perform an operation or not may depend on various things,\nincluding the users authorizations to interact with this resource and\nthe internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant/tenantOne/user-members`", + "value": { + "links": [ + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/user-members", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/user-members", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/tenant/{id}/user-members/{userId}": { + "delete": { + "operationId": "deleteUserMembership", + "tags": [ + "Tenant" + ], + "summary": "Delete a Tenant User Membership", + "description": "Deletes a membership between a tenant and an user.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant." + }, + { + "name": "userId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "createUserMembership", + "tags": [ + "Tenant" + ], + "summary": "Create Tenant User Membership", + "description": "Creates a membership between a tenant and an user.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant." + }, + { + "name": "userId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an internal error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/user": { + "get": { + "operationId": "getUsers", + "tags": [ + "User" + ], + "summary": "Get List", + "description": "Query for a list of users using a list of parameters.\nThe size of the result set can be retrieved by using the Get User Count method.\n[Get User Count](https://docs.camunda.org/manual/7.22/reference/rest/user/get-query-count/) method.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by user id" + }, + { + "name": "idIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of user ids." + }, + { + "name": "firstName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the first name of the user. Exact match." + }, + { + "name": "firstNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the first name that the parameter is a substring of." + }, + { + "name": "lastName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the last name of the user. Exact match." + }, + { + "name": "lastNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the last name that the parameter is a substring of." + }, + { + "name": "email", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the email of the user. Exact match." + }, + { + "name": "emailLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the email that the parameter is a substring of." + }, + { + "name": "memberOfGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter for users which are members of the given group." + }, + { + "name": "memberOfTenant", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter for users which are members of the given tenant." + }, + { + "name": "potentialStarter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select Users that are potential starter for the given process definition." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "userId", + "firstName", + "lastName", + "email" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserProfileDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/user?firstName\u003dJohn`", + "value": [ + { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "anEmailAddress" + }, + { + "id": "jonny2", + "firstName": "John", + "lastName": "Smoe", + "email": "anotherEmailAddress" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`, or if an invalid operator for variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableOperations", + "tags": [ + "User" + ], + "summary": "Options", + "description": "The `/user` resource supports two custom `OPTIONS` requests, one for the resource as such\nand one for individual user instances. The `OPTIONS` request allows checking for the set of\navailable operations that the currently authenticated user can perform on the /user resource.\nIf the user can perform an operation or not may depend on various things, including the user\u0027s\nauthorizations to interact with this resource and the internal configuration of the process\nengine. `OPTIONS /user` returns available interactions on the resource.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "GET `/user`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/user", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/user/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/user/create", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/user/count": { + "get": { + "operationId": "getUserCount", + "tags": [ + "User" + ], + "summary": "Get List Count", + "description": "Queries for the number of deployments that fulfill given parameters. Takes the same parameters as the\n[Get Users](https://docs.camunda.org/manual/7.22/reference/rest/user/get-query/) method.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by user id" + }, + { + "name": "idIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of user ids." + }, + { + "name": "firstName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the first name of the user. Exact match." + }, + { + "name": "firstNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the first name that the parameter is a substring of." + }, + { + "name": "lastName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the last name of the user. Exact match." + }, + { + "name": "lastNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the last name that the parameter is a substring of." + }, + { + "name": "email", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the email of the user. Exact match." + }, + { + "name": "emailLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the email that the parameter is a substring of." + }, + { + "name": "memberOfGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter for users which are members of the given group." + }, + { + "name": "memberOfTenant", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter for users which are members of the given tenant." + }, + { + "name": "potentialStarter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select Users that are potential starter for the given process definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/user/count?firstName\u003dJohn`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example, if an invalid operator for variable\ncomparison is used. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/user/create": { + "post": { + "operationId": "createUser", + "tags": [ + "User" + ], + "summary": "Create", + "description": "Create a new user.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDto" + }, + "examples": { + "example-1": { + "summary": "POST /user/create", + "value": { + "profile": { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "anEmailAddress" + }, + "credentials": { + "password": "s3cret" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + } + } + } + }, + "/user/{id}": { + "delete": { + "operationId": "deleteUser", + "tags": [ + "User" + ], + "summary": "Delete", + "description": "Deletes a user by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "A Deployment with the provided id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableUserOperations", + "tags": [ + "User" + ], + "summary": "Options", + "description": "The `/user` resource supports two custom `OPTIONS` requests, one for the resource as such\nand one for individual user instances. The `OPTIONS` request allows checking for the set of\navailable operations that the currently authenticated user can perform on the /user resource.\nIf the user can perform an operation or not may depend on various things, including the user\u0027s\nauthorizations to interact with this resource and the internal configuration of the process\nengine. `OPTIONS /user/{id}` returns available interactions on a resource instance.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to be deleted." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "GET `/user/peter`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/user/peter/profile", + "rel": "self" + }, + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/user/peter", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/user/peter/profile", + "rel": "update" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/user/{id}/credentials": { + "put": { + "operationId": "updateCredentials", + "tags": [ + "User" + ], + "summary": "Update Credentials", + "description": "Updates a user\u0027s credentials (password)", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserCredentialsDto" + }, + "examples": { + "example-1": { + "summary": "PUT /user/jonny1/credentials", + "value": { + "password": "s3cr3t", + "authenticatedUserPassword": "demo" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authenticated user password does not match" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the corresponding user cannot be found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The user could not be updated due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/user/{id}/profile": { + "get": { + "operationId": "getUserProfile", + "tags": [ + "User" + ], + "summary": "Get Profile", + "description": "Retrieves a user\u0027s profile.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to retrieve." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserProfileDto" + }, + "examples": { + "example-1": { + "summary": "GET `/user/jonny1/profile", + "value": { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "anEmailAddress" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Execution with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "updateProfile", + "tags": [ + "User" + ], + "summary": "Update User Profile", + "description": "Updates the profile information of an already existing user.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserProfileDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/user/jonny1/profile`", + "value": { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "aNewEmailAddress" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the user with the requested Id cannot be found." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The user could not be updated due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/user/{id}/unlock": { + "post": { + "operationId": "unlockUser", + "tags": [ + "User" + ], + "summary": "Unlock User", + "description": "Unlocks a user by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to be unlocked." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "The user who performed the operation is not a Camunda admin user." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "User cannot be found. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/variable-instance": { + "get": { + "operationId": "getVariableInstances", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instances", + "description": "Query for variable instances that fulfill given parameters. Parameters may be the\nproperties of variable instances, such as the name or type. The size\nof the result set can be retrieved by using the [Get Variable Instance\nCount](https://docs.camunda.org/manual/7.22/reference/rest/variable-instance/get-query-count/)\nmethod.", + "parameters": [ + { + "name": "variableName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable instance name." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the variable instance name. The parameter can include the wildcard `%` to\nexpress like-strategy such as: starts with (`%`name), ends with (name`%`) or\ncontains (`%`name`%`)." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nprocess instance ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nexecution ids." + }, + { + "name": "caseInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated case instance ids." + }, + { + "name": "caseExecutionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated case execution ids." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated task\nids." + }, + { + "name": "batchIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nbatch ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nactivity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\ntenant ids." + }, + { + "name": "variableValues", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances that have the certain values.\nValue filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` -\ngreater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or\nequal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in `variableValues` case-insensitively. If set to `true`\n**variableName** and **variablename** are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in `variableValues` case-insensitively. If set to\n`true` **variableValue** and **variablevalue** are treated as equal." + }, + { + "name": "variableScopeIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of passed scope ids." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "variableName", + "variableType", + "activityInstanceId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableInstanceDto" + } + }, + "examples": { + "example-1": { + "description": "GET `/variable-instance?processInstanceIdIn\u003daProcessInstanceId,anotherProcessInstanceId\u0026variableValues\u003damount_gteq_5,amount_lteq_200`", + "value": [ + { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "b68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "errorMessage": null, + "tenantId": null + }, + { + "id": "someOtherId", + "name": "amount", + "type": "Integer", + "value": 15, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "errorMessage": null, + "tenantId": null + }, + { + "id": "yetAnotherId", + "name": "amount", + "type": "Integer", + "value": 150, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "anotherProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_2:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "errorMessage": null, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryVariableInstances", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instances (POST)", + "description": "Query for variable instances that fulfill given parameters through a JSON object.\nThis method is slightly more powerful than the\n[Get Variable Instances](https://docs.camunda.org/manual/7.22/reference/rest/variable-\ninstance/get-query/) method because it allows filtering by multiple\nvariable instances of types `String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/variable-instance`", + "value": { + "variableValues": [ + { + "name": "amount", + "operator": "gteq", + "value": 5 + }, + { + "name": "amount", + "operator": "lteq", + "value": 200 + } + ], + "processInstanceIdIn": [ + "aProcessInstanceId", + "anotherProcessInstanceId" + ], + "sorting": [ + { + "sortBy": "variableType", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableInstanceDto" + } + }, + "examples": { + "example-1": { + "description": "POST `/variable-instance`", + "value": [ + { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "b68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "errorMessage": null, + "tenantId": null + }, + { + "id": "someOtherId", + "name": "amount", + "type": "Integer", + "value": 15, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "errorMessage": null, + "tenantId": null + }, + { + "id": "yetAnotherId", + "name": "amount", + "type": "Integer", + "value": 150, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "anotherProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_2:b68b71ca-e310-11e2-beb0-f0def1557726", + "errorMessage": null, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/variable-instance/count": { + "get": { + "operationId": "getVariableInstancesCount", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instance Count", + "description": "Query for the number of variable instances that fulfill given parameters. Takes the\nsame parameters as the [Get Variable\nInstances](https://docs.camunda.org/manual/7.22/reference/rest/variable-instance/get-query/)\nmethod.", + "parameters": [ + { + "name": "variableName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable instance name." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the variable instance name. The parameter can include the wildcard `%` to\nexpress like-strategy such as: starts with (`%`name), ends with (name`%`) or\ncontains (`%`name`%`)." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nprocess instance ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nexecution ids." + }, + { + "name": "caseInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated case instance ids." + }, + { + "name": "caseExecutionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated case execution ids." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated task\nids." + }, + { + "name": "batchIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nbatch ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nactivity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\ntenant ids." + }, + { + "name": "variableValues", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances that have the certain values.\nValue filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` -\ngreater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or\nequal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in `variableValues` case-insensitively. If set to `true`\n**variableName** and **variablename** are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in `variableValues` case-insensitively. If set to\n`true` **variableValue** and **variablevalue** are treated as equal." + }, + { + "name": "variableScopeIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of passed scope ids." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "GET `/variable-instance/count?processInstanceIdIn\u003daProcessInstanceId,anotherProcessInstanceId\u0026variableValues\u003damount_gteq_5,amount_lteq_200`", + "value": { + "count": 3 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if an invalid operator for variable\ncomparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryVariableInstancesCount", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instance Count (POST)", + "description": "Query for the number of variable instances that fulfill given parameters. This\nmethod takes the same message body as the\n[Get Variable Instances POST](https://docs.camunda.org/manual/7.22/reference/rest/variable-\ninstance/post-query/) method and therefore it is slightly more\npowerful than the [Get Variable Instance\nCount](https://docs.camunda.org/manual/7.22/reference/rest/variable-instance/get-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/variable-instance/count`", + "value": { + "variableValues": [ + { + "name": "amount", + "operator": "gteq", + "value": "5" + }, + { + "name": "amount", + "operator": "lteq", + "value": 200 + } + ], + "processInstanceIdIn": [ + "aProcessInstanceId", + "anotherProcessInstanceId" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "POST `/variable-instance/count`", + "value": { + "count": 3 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if an invalid operator for variable\ncomparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/variable-instance/{id}": { + "get": { + "operationId": "getVariableInstance", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instance", + "description": "Retrieves a variable by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the variable instance." + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward compatibility, we recommend setting this\nparameter to `false` when developing web applications that are independent of the Java process\napplications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/variable-instance/someId`", + "value": { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "b68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "tenantId": null, + "errorMessage": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/variable-instance/{id}/data": { + "get": { + "operationId": "getVariableInstanceBinary", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instance (Binary)", + "description": "Retrieves the content of a variable by id. Applicable for byte array and file\nvariables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the variable instance." + } + ], + "responses": { + "200": { + "description": "Request successful. For binary variables or files without any MIME type information, a byte stream is returned.\n File variables with MIME type information are returned as the saved type. Additionally, for file\n variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For files without any MIME type information, a byte stream is returned." + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information are returned as the saved type. Additionally, for file\n responses, the Content-Disposition header will be set." + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id exists but does not serialize as binary data. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/version": { + "get": { + "operationId": "getRestAPIVersion", + "tags": [ + "Version" + ], + "summary": "Get Rest API version", + "description": "Retrieves the version of the Rest API.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": { + "version": "7.13.0" + } + } + } + } + }, + "description": "Request successful." + } + } + } + } + }, + "security": [ + { + "basicAuth": [] + } + ], + "components": { + "securitySchemes": { + "basicAuth": { + "type": "http", + "scheme": "basic" + } + }, + "schemas": { + "AbstractSetRemovalTimeDto": { + "type": "object", + "properties": { + "absoluteRemovalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date for which the instances shall be removed. Value may not be `null`.\n\n**Note:** Cannot be set in conjunction with `clearedRemovalTime` or `calculatedRemovalTime`." + }, + "clearedRemovalTime": { + "type": "boolean", + "nullable": true, + "description": "Sets the removal time to `null`. Value may only be `true`, as `false` is the default behavior.\n\n**Note:** Cannot be set in conjunction with `absoluteRemovalTime` or `calculatedRemovalTime`." + }, + "calculatedRemovalTime": { + "type": "boolean", + "nullable": true, + "description": "The removal time is calculated based on the engine\u0027s configuration settings. Value may only be `true`, as `false` is the default behavior.\n\n**Note:** Cannot be set in conjunction with `absoluteRemovalTime` or `clearedRemovalTime`." + } + } + }, + "AbstractVendorVersionInformationDto": { + "type": "object", + "properties": { + "vendor": { + "type": "string", + "nullable": true, + "description": "Information about the vendor." + }, + "version": { + "type": "string", + "nullable": true, + "description": "Information about the version." + } + } + }, + "ActivityInstanceDto": { + "type": "object", + "description": "A JSON object corresponding to the Activity Instance tree of the given process instance.", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance." + }, + "parentActivityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent activity instance, for example a sub process instance." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity." + }, + "activityName": { + "type": "string", + "nullable": true, + "description": "The name of the activity" + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the activity. This property is deprecated. Please use \u0027activityName\u0027." + }, + "activityType": { + "type": "string", + "nullable": true, + "description": "The type of activity (corresponds to the XML element name in the BPMN 2.0, e.g., \u0027userTask\u0027)" + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance this activity instance is part of." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition." + }, + "childActivityInstances": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ActivityInstanceDto" + }, + "description": "A list of child activity instances." + }, + "childTransitionInstances": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TransitionInstanceDto" + }, + "description": "A list of child transition instances.\nA transition instance represents an execution waiting in an asynchronous continuation." + }, + "executionIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of execution ids." + }, + "incidentIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of incident ids." + }, + "incidents": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ActivityInstanceIncidentDto" + }, + "description": "A list of JSON objects containing incident specific properties:\n* `id`: the id of the incident\n* `activityId`: the activity id in which the incident occurred" + } + } + }, + "ActivityInstanceIncidentDto": { + "type": "object", + "description": "An activity instance, incident pair.", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the incident." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The activity id in which the incident happened." + } + } + }, + "ActivityStatisticsResultDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the activity the results are aggregated for." + }, + "instances": { + "type": "integer", + "format": "int32", + "description": "The total number of running process instances of this activity." + }, + "failedJobs": { + "type": "integer", + "format": "int32", + "description": "The total number of failed jobs for the running instances.\n**Note**: Will be `0` (not `null`), if failed jobs were excluded." + }, + "incidents": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/IncidentStatisticsResultDto" + }, + "description": "Each item in the resulting array is an object which contains `incidentType` and `incidentCount`.\n**Note**: Will be an empty array, if `incidents` or `incidentsForType` were excluded.\nFurthermore, the array will be also empty if no incidents were found." + }, + "@class": { + "type": "string", + "nullable": true, + "description": "The fully qualified class name of the data transfer object class.\nThe class name might change in future releases." + } + } + }, + "AnnotationDto": { + "type": "object", + "properties": { + "annotation": { + "type": "string", + "nullable": true, + "description": "The annotation value to put." + } + } + }, + "AnyValue": { + "description": "Can be any value - string, number, boolean, array or object.\n **Note**: Not every endpoint supports every type." + }, + "AtomLink": { + "type": "object", + "properties": { + "rel": { + "type": "string", + "nullable": true, + "description": "The relation of the link to the object that belongs to." + }, + "href": { + "type": "string", + "nullable": true, + "description": "The url of the link." + }, + "method": { + "type": "string", + "nullable": true, + "description": "The http method." + } + } + }, + "AttachmentDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the task attachment." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the task attachment." + }, + "description": { + "type": "string", + "nullable": true, + "description": "The description of the task attachment." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task to which the attachment belongs." + }, + "type": { + "type": "string", + "nullable": true, + "description": "Indication of the type of content that this attachment refers to.\nCan be MIME type or any other indication." + }, + "url": { + "type": "string", + "nullable": true, + "description": "The url to the remote content of the task attachment." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the variable was inserted.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the attachment should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process containing the task." + } + } + }, + { + "$ref": "#/components/schemas/LinkableDto" + } + ] + }, + "AuthenticationResult": { + "type": "object", + "properties": { + "authenticatedUser": { + "type": "string", + "nullable": true, + "description": "An id of authenticated user." + }, + "authenticated": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating if user is authenticated." + }, + "tenants": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Will be null." + }, + "groups": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Will be null." + } + } + }, + "AuthorizationCheckResultDto": { + "type": "object", + "properties": { + "permissionName": { + "type": "string", + "nullable": true, + "description": "Name of the permission which was checked." + }, + "resourceName": { + "type": "string", + "nullable": true, + "description": "The name of the resource for which the permission check was performed." + }, + "resourceId": { + "type": "string", + "nullable": true, + "description": "The id of the resource for which the permission check was performed." + }, + "authorized": { + "type": "boolean", + "nullable": true, + "description": "Returns true or false depending on whether the user is authorized or not." + } + } + }, + "AuthorizationCreateDto": { + "type": "object", + "properties": { + "type": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The type of the authorization (0\u003dglobal, 1\u003dgrant, 2\u003drevoke). See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service.md#authorization-type)\nfor more information about authorization types." + }, + "permissions": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "An array of Strings holding the permissions provided by this authorization." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user this authorization has been created for. The value `*`\nrepresents a global authorization ranging over all users." + }, + "groupId": { + "type": "string", + "nullable": true, + "description": "The id of the group this authorization has been created for." + }, + "resourceType": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "An integer representing the resource type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + "resourceId": { + "type": "string", + "nullable": true, + "description": "The resource Id. The value `*` represents an authorization ranging over all\ninstances of a resource." + } + } + }, + "AuthorizationDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the authorization." + }, + "type": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The type of the authorization (0\u003dglobal, 1\u003dgrant, 2\u003drevoke). See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service.md#authorization-type)\nfor more information about authorization types." + }, + "permissions": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "An array of Strings holding the permissions provided by this authorization." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user this authorization has been created for. The value `*`\nrepresents a global authorization ranging over all users." + }, + "groupId": { + "type": "string", + "nullable": true, + "description": "The id of the group this authorization has been created for." + }, + "resourceType": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "An integer representing the resource type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + "resourceId": { + "type": "string", + "nullable": true, + "description": "The resource Id. The value `*` represents an authorization ranging over all\ninstances of a resource." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The removal time indicates the date a historic instance\nauthorization is cleaned up. A removal time can only be assigned to a historic\ninstance authorization. Can be `null` when not related to a historic instance\nresource or when the removal time strategy is end and the root process instance\nis not finished. Default format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance the historic\ninstance authorization is related to. Can be `null` if not related to a historic instance\nresource." + } + } + }, + "AuthorizationExceptionDto": { + "allOf": [ + { + "type": "object", + "properties": { + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user that does not have expected permissions" + }, + "missingAuthorizations": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/MissingAuthorizationDto" + }, + "description": "" + } + } + }, + { + "$ref": "#/components/schemas/ExceptionDto" + } + ] + }, + "AuthorizationUpdateDto": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "An array of Strings holding the permissions provided by this authorization." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user this authorization has been created for. The value `*`\nrepresents a global authorization ranging over all users." + }, + "groupId": { + "type": "string", + "nullable": true, + "description": "The id of the group this authorization has been created for." + }, + "resourceType": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "An integer representing the resource type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + "resourceId": { + "type": "string", + "nullable": true, + "description": "The resource Id. The value `*` represents an authorization ranging over all\ninstances of a resource." + } + } + }, + "BasicUserCredentialsDto": { + "type": "object", + "properties": { + "username": { + "type": "string", + "nullable": true, + "description": "The username of a user." + }, + "password": { + "type": "string", + "nullable": true, + "description": "A password of a user." + } + } + }, + "BatchDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the batch." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of the batch.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + "totalJobs": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The total jobs of a batch is the number of batch execution jobs required to complete the batch." + }, + "jobsCreated": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of batch execution jobs already created by the seed job." + }, + "batchJobsPerSeed": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of batch execution jobs created per seed job invocation.\nThe batch seed job is invoked until it has created all batch execution jobs required by the batch\n(see `totalJobs` property)." + }, + "invocationsPerBatchJob": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Every batch execution job invokes the command executed by the batch `invocationsPerBatchJob` times.\nE.g., for a process instance migration batch this specifies the number of process instances which are migrated per batch execution job." + }, + "seedJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the seed jobs of this batch." + }, + "monitorJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the monitor jobs of this batch." + }, + "batchJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the batch execution jobs of this batch." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Indicates whether this batch is suspended or not." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the batch." + }, + "createUserId": { + "type": "string", + "nullable": true, + "description": "The id of the user that created the batch." + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the batch was started. Default format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`. For further information,\nplease see the [documentation] (https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "executionStartTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the batch execution was started, i.e., at least one batch job has been executed. Default\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`. For further information, please see the [documentation]\n(https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + } + } + }, + "BatchStatisticsDto": { + "allOf": [ + { + "type": "object", + "properties": { + "remainingJobs": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of remaining batch execution jobs. This does include failed batch execution jobs and\nbatch execution jobs which still have to be created by the seed job." + }, + "completedJobs": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of completed batch execution jobs. This does include aborted/deleted batch execution jobs." + }, + "failedJobs": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of failed batch execution jobs. This does not include aborted or deleted batch execution jobs." + } + } + }, + { + "$ref": "#/components/schemas/BatchDto" + } + ] + }, + "CalledProcessDefinitionDto": { + "allOf": [ + { + "type": "object", + "properties": { + "calledFromActivityIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Ids of the CallActivities which call this process." + }, + "callingProcessDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the calling process definition" + } + } + }, + { + "$ref": "#/components/schemas/ProcessDefinitionDto" + } + ] + }, + "CamundaFormRef": { + "type": "object", + "properties": { + "key": { + "type": "string", + "nullable": true, + "description": "The key of the Camunda Form." + }, + "binding": { + "type": "string", + "nullable": true, + "description": "The binding of the Camunda Form. Can be `latest`, `deployment` or `version`." + }, + "version": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The specific version of a Camunda Form. This property is only set if `binding` is `version`." + } + } + }, + "CaseDefinitionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the case definition" + }, + "key": { + "type": "string", + "nullable": true, + "description": "The key of the case definition, i.e., the id of the CMMN 2.0 XML case definition." + }, + "category": { + "type": "string", + "nullable": true, + "description": "The category of the case definition." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the case definition." + }, + "version": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the case definition that the engine assigned to it." + }, + "resource": { + "type": "string", + "nullable": true, + "description": "The file name of the case definition." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The deployment id of the case definition." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the case definition." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0, + "description": "History time to live value of the case definition.\nIs used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)." + } + } + }, + "CheckPasswordPolicyResultDto": { + "allOf": [ + { + "type": "object", + "properties": { + "valid": { + "type": "boolean", + "nullable": true, + "description": "`true` if the password is compliant with the policy, otherwise `false`." + } + } + }, + { + "$ref": "#/components/schemas/PasswordPolicyDto" + } + ] + }, + "CheckPasswordPolicyRuleDto": { + "allOf": [ + { + "type": "object", + "properties": { + "valid": { + "type": "boolean", + "nullable": true, + "description": "`true` if the password is compliant with this rule, otherwise `false`." + } + } + }, + { + "$ref": "#/components/schemas/PasswordPolicyRuleDto" + } + ] + }, + "CleanableHistoricBatchReportResultDto": { + "type": "object", + "properties": { + "batchType": { + "type": "string", + "nullable": true, + "description": "The type of the batch operation." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The history time to live of the batch operation." + }, + "finishedBatchesCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the finished batch operations." + }, + "cleanableBatchesCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the cleanable historic batch operations, referring to history time to\nlive." + } + } + }, + "CleanableHistoricDecisionInstanceReportResultDto": { + "type": "object", + "properties": { + "decisionDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the decision definition." + }, + "decisionDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the decision definition." + }, + "decisionDefinitionName": { + "type": "string", + "nullable": true, + "description": "The name of the decision definition." + }, + "decisionDefinitionVersion": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the decision definition." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The history time to live of the decision definition." + }, + "finishedDecisionInstanceCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the finished historic decision instances." + }, + "cleanableDecisionInstanceCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the cleanable historic decision instances, referring to history time\nto live." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the decision definition." + } + } + }, + "CleanableHistoricProcessInstanceReportResultDto": { + "type": "object", + "properties": { + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "The name of the process definition." + }, + "processDefinitionVersion": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the process definition." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The history time to live of the process definition." + }, + "finishedProcessInstanceCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the finished historic process instances." + }, + "cleanableProcessInstanceCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the cleanable historic process instances, referring to history time to\nlive." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the process definition." + } + } + }, + "CommentDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the task comment." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user who created the comment." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task to which the comment belongs." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the comment is related to." + }, + "time": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when the comment was created.\n[Default format]($(docsUrl)/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "message": { + "type": "string", + "nullable": true, + "description": "The content of the comment." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the comment should be removed by the History Cleanup job.\n[Default format]($(docsUrl)/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining the task." + } + } + }, + { + "$ref": "#/components/schemas/LinkableDto" + } + ] + }, + "CompleteExternalTaskDto": { + "allOf": [ + { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object with the following properties:" + }, + "localVariables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing local variable key-value pairs. Local variables are set only in the scope of external task. Each key is a variable name and each value a JSON variable value object with the following properties:" + } + } + }, + { + "$ref": "#/components/schemas/HandleExternalTaskDto" + } + ] + }, + "CompleteTaskDto": { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs." + }, + "withVariablesInReturn": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Indicates whether the response should contain the process variables or not. The\ndefault is `false` with a response code of `204`. If set to `true` the response\ncontains the process variables and has a response code of `200`. If the task is not\nassociated with a process instance (e.g. if it\u0027s part of a case instance) no\nvariables will be returned." + } + } + }, + "ConditionQueryParameterDto": { + "type": "object", + "properties": { + "operator": { + "type": "string", + "nullable": true, + "enum": [ + "eq", + "neq", + "gt", + "gteq", + "lt", + "lteq", + "like", + "notLike" + ], + "description": "Comparison operator to be used. `notLike` is not supported by all endpoints." + }, + "value": { + "$ref": "#/components/schemas/AnyValue" + } + } + }, + "CorrelationMessageAsyncDto": { + "type": "object", + "properties": { + "messageName": { + "type": "string", + "nullable": true, + "description": "The name of the message to correlate. Corresponds to the \u0027name\u0027 element of the message defined in BPMN 2.0 XML. Can be null to correlate by other criteria only." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids that define a group of process instances\nto which the operation will correlate a message.\n\nPlease note that if `processInstanceIds`, `processInstanceQuery` and `historicProcessInstanceQuery`\nare defined, the resulting operation will be performed on the union of these sets." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "All variables the operation will set in the root scope of the process instances the message is correlated to." + } + } + }, + "CorrelationMessageDto": { + "type": "object", + "properties": { + "messageName": { + "type": "string", + "nullable": true, + "description": "The name of the message to deliver." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "Used for correlation of process instances that wait for incoming messages.\nWill only correlate to executions that belong to a process instance with the provided business key." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "Used to correlate the message for a tenant with the given id.\nWill only correlate to executions and process definitions which belong to the tenant.\nMust not be supplied in conjunction with a `withoutTenantId`." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A Boolean value that indicates whether the message should only be correlated to executions\nand process definitions which belong to no tenant or not. Value may only be `true`, as `false`\nis the default behavior.\nMust not be supplied in conjunction with a `tenantId`." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Used to correlate the message to the process instance with the given id." + }, + "correlationKeys": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "Used for correlation of process instances that wait for incoming messages.\nHas to be a JSON object containing key-value pairs that are matched against process instance variables\nduring correlation. Each key is a variable name and each value a JSON variable value object with the\nfollowing properties." + }, + "localCorrelationKeys": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "Local variables used for correlation of executions (process instances) that wait for incoming messages.\nHas to be a JSON object containing key-value pairs that are matched against local variables during correlation.\nEach key is a variable name and each value a JSON variable value object with the following properties." + }, + "processVariables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of variables that is injected into the triggered execution or process instance after the message\nhas been delivered. Each key is a variable name and each value a JSON variable value object with\nthe following properties." + }, + "processVariablesLocal": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of local variables that is injected into the execution waiting on the message.\nEach key is a variable name and each value a JSON variable value object\nwith the following properties." + }, + "processVariablesToTriggeredScope": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of variables that is injected into the new scope triggered by message correlation.\nEach key is a variable name and each value a JSON variable value object\nwith the following properties." + }, + "all": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A Boolean value that indicates whether the message should be correlated to exactly one entity or multiple entities.\nIf the value is set to `false`, the message will be correlated to exactly one entity (execution or process definition).\nIf the value is set to `true`, the message will be correlated to multiple executions and a process definition that\ncan be instantiated by this message in one go." + }, + "resultEnabled": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A Boolean value that indicates whether the result of the correlation should be returned or not.\nIf this property is set to `true`, there will be returned a list of message correlation result objects. Depending on the\nall property, there will be either one ore more returned results in the list.\n\nThe default value is `false`, which means no result will be returned." + }, + "variablesInResultEnabled": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A Boolean value that indicates whether the result of the correlation should contain process variables or not.\nThe parameter resultEnabled should be set to `true` in order to use this it.\n\nThe default value is `false`, which means the variables will not be returned." + } + } + }, + "CountResultDto": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int64", + "description": "The number of matching instances." + } + } + }, + "CreateFilterDto": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "nullable": true, + "description": "The resource type of the filter." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the filter." + }, + "owner": { + "type": "string", + "nullable": true, + "description": "The user id of the owner of the filter." + }, + "query": { + "type": "object", + "description": "The query of the filter as a JSON object." + }, + "properties": { + "type": "object", + "description": "The properties of a filter as a JSON object." + } + } + }, + "CreateIncidentDto": { + "type": "object", + "properties": { + "incidentType": { + "type": "string", + "nullable": true, + "description": "A type of the new incident." + }, + "configuration": { + "type": "string", + "nullable": true, + "description": "A configuration for the new incident." + }, + "message": { + "type": "string", + "nullable": true, + "description": "A message for the new incident." + } + } + }, + "DecisionDefinitionDiagramDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision definition." + }, + "dmnXml": { + "type": "string", + "nullable": true, + "description": "An escaped XML string containing the XML that this decision definition was deployed with.\nCarriage returns, line feeds and quotation marks are escaped." + } + } + }, + "DecisionDefinitionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision definition" + }, + "key": { + "type": "string", + "nullable": true, + "description": "The key of the decision definition, i.e., the id of the DMN 1.0 XML decision definition." + }, + "category": { + "type": "string", + "nullable": true, + "description": "The category of the decision definition." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the decision definition." + }, + "version": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the decision definition that the engine assigned to it." + }, + "resource": { + "type": "string", + "nullable": true, + "description": "The file name of the decision definition." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The deployment id of the decision definition." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the decision definition." + }, + "decisionRequirementsDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the decision requirements definition this decision definition belongs to." + }, + "decisionRequirementsDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the decision requirements definition this decision definition belongs to." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0, + "description": "History time to live value of the decision definition.\nIs used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)." + }, + "versionTag": { + "type": "string", + "nullable": true, + "description": "The version tag of the decision definition." + } + } + }, + "DecisionRequirementsDefinitionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision requirements definition." + }, + "key": { + "type": "string", + "nullable": true, + "description": "The key of the decision requirements definition." + }, + "category": { + "type": "string", + "nullable": true, + "description": "The category of the decision requirements definition." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the decision requirements definition." + }, + "version": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the decision requirements definition that the engine assigned to\nit." + }, + "resource": { + "type": "string", + "nullable": true, + "description": "The file name of the decision requirements definition." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The deployment id of the decision requirements definition." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the decision requirements definition." + } + } + }, + "DecisionRequirementsDefinitionXmlDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision requirements definition." + }, + "dmnXml": { + "type": "string", + "nullable": true, + "description": "An escaped XML string containing the XML that this decision requirements definition\nwas deployed with. Carriage returns, line feeds and quotation marks\nare escaped." + } + } + }, + "DeleteHistoricDecisionInstancesDto": { + "type": "object", + "properties": { + "historicDecisionInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of historic decision instance ids to delete." + }, + "historicDecisionInstanceQuery": { + "$ref": "#/components/schemas/HistoricDecisionInstanceQueryDto" + }, + "deleteReason": { + "type": "string", + "nullable": true, + "description": "A string with delete reason." + } + } + }, + "DeleteHistoricProcessInstancesDto": { + "type": "object", + "properties": { + "historicProcessInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list historic process instance ids to delete." + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "deleteReason": { + "type": "string", + "nullable": true, + "description": "A string with delete reason." + }, + "failIfNotExists": { + "type": "boolean", + "nullable": true, + "description": "If set to `false`, the request will still be successful if one ore more of the process ids are not found." + } + } + }, + "DeleteProcessInstancesDto": { + "type": "object", + "properties": { + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list process instance ids to delete." + }, + "deleteReason": { + "type": "string", + "nullable": true, + "description": "A string with delete reason." + }, + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "Skip execution listener invocation for activities that are started or ended as part of this request." + }, + "skipSubprocesses": { + "type": "boolean", + "nullable": true, + "description": "Skip deletion of the subprocesses related to deleted processes as part of this request." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "Skip execution of [input/output variable mappings](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#input-output-variable-mapping)\nfor activities that are started or ended as part of this request." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + } + } + }, + "DeploymentDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the deployment." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the deployment." + }, + "deploymentTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when the deployment was created." + }, + "source": { + "type": "string", + "nullable": true, + "description": "The source of the deployment." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the deployment." + } + } + }, + { + "$ref": "#/components/schemas/LinkableDto" + } + ] + }, + "DeploymentResourceDto": { + "title": "DeploymentResourceDto", + "type": "object", + "description": "A JSON object corresponding to the `Resource` interface in the engine.\nIts properties are as follows:", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the deployment resource." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the deployment resource" + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The id of the deployment." + } + } + }, + "DeploymentWithDefinitionsDto": { + "allOf": [ + { + "type": "object", + "properties": { + "deployedProcessDefinitions": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + }, + "description": "A JSON Object containing a property for each of the process definitions,\nwhich are successfully deployed with that deployment.\nThe key is the process definition id, the value is a JSON Object corresponding to the process definition." + }, + "deployedDecisionDefinitions": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/DecisionDefinitionDto" + }, + "description": "A JSON Object containing a property for each of the decision definitions,\nwhich are successfully deployed with that deployment.\nThe key is the decision definition id, the value is a JSON Object corresponding to the decision definition." + }, + "deployedDecisionRequirementsDefinitions": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionDto" + }, + "description": "A JSON Object containing a property for each of the decision requirements definitions,\nwhich are successfully deployed with that deployment.\nThe key is the decision requirements definition id, the value is a JSON Object corresponding to the decision requirements definition." + }, + "deployedCaseDefinitions": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/CaseDefinitionDto" + }, + "description": "A JSON Object containing a property for each of the case definitions,\nwhich are successfully deployed with that deployment.\nThe key is the case definition id, the value is a JSON Object corresponding to the case definition." + } + } + }, + { + "$ref": "#/components/schemas/DeploymentDto" + } + ] + }, + "DurationReportResultDto": { + "type": "object", + "properties": { + "period": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Specifies a timespan within a year.\n**Note:** The period must be interpreted in conjunction with the returned `periodUnit`." + }, + "periodUnit": { + "type": "string", + "nullable": true, + "enum": [ + "MONTH", + "QUARTER" + ], + "description": "The unit of the given period. Possible values are `MONTH` and `QUARTER`." + }, + "minimum": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The smallest duration in milliseconds of all completed process instances which were started in the given period." + }, + "maximum": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The greatest duration in milliseconds of all completed process instances which were started in the given period." + }, + "average": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The average duration in milliseconds of all completed process instances which were started in the given period." + } + } + }, + "EvaluateDecisionDto": { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "" + } + } + }, + "EvaluationConditionDto": { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of variables which are used for evaluation of the conditions and are injected into the process instances which have been triggered.\nEach key is a variable name and each value a JSON variable value object with the following properties." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "Used for the process instances that have been triggered after the evaluation." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "Used to evaluate a condition for a tenant with the given id.\nWill only evaluate conditions of process definitions which belong to the tenant." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "A Boolean value that indicates whether the conditions should only be evaluated of process definitions which belong to no tenant or not.\nValue may only be true, as false is the default behavior." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Used to evaluate conditions of the process definition with the given id." + } + } + }, + "EventSubscriptionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the event subscription." + }, + "eventType": { + "type": "string", + "nullable": true, + "description": "The type of the event subscription." + }, + "eventName": { + "type": "string", + "nullable": true, + "description": "The name of the event this subscription belongs to as defined in the process model." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution that is subscribed on the referenced event." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance this subscription belongs to." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The identifier of the activity that this event subscription belongs to.\nThis could for example be the id of a receive task." + }, + "createdDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time this event subscription was created." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant this event subscription belongs to.\nCan be `null` if the subscription belongs to no single tenant." + } + } + }, + "EventSubscriptionQueryDto": { + "type": "object", + "description": "A event subscription query which retrieves a list of event subscriptions", + "properties": { + "eventSubscriptionId": { + "type": "string", + "nullable": true, + "description": "The id of the event subscription." + }, + "eventName": { + "type": "string", + "nullable": true, + "description": "The name of the event this subscription belongs to as defined in the process model." + }, + "eventType": { + "type": "string", + "nullable": true, + "enum": [ + "message", + "signal", + "compensate", + "conditional" + ], + "description": "The type of the event subscription." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution that is subscribed on the referenced event." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance this subscription belongs to." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The identifier of the activity that this event subscription belongs to.\nThis could for example be the id of a receive task." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nOnly select subscriptions that belong to one of the given tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only select subscriptions which have no tenant id.\nValue may only be `true`, as `false` is the default behavior." + }, + "includeEventSubscriptionsWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Select event subscriptions which have no tenant id.\nCan be used in combination with tenantIdIn parameter.\nValue may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "created", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "ExceptionDto": { + "title": "ExceptionDto", + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true, + "description": "An exception class indicating the occurred error." + }, + "message": { + "type": "string", + "nullable": true, + "description": "A detailed message of the error." + }, + "code": { + "type": "number", + "description": "The code allows your client application to identify the error in an automated fashion.\nYou can look up the meaning of all built-in codes and learn how to add custom codes\nin the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/error-handling/#exception-codes)." + } + } + }, + "ExecutionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the Execution." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the root of the execution tree representing the process instance." + }, + "ended": { + "type": "boolean", + "nullable": true, + "description": "Indicates if the execution is ended." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant this execution belongs to. Can be `null`\nif the execution belongs to no single tenant." + } + } + }, + "ExecutionQueryDto": { + "type": "object", + "description": "A Execution instance query which defines a list of Execution instances", + "properties": { + "businessKey": { + "type": "string", + "nullable": true, + "description": "Filter by the business key of the process instances the executions belong to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the process definition the executions run on." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the process definition the executions run on." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the process instance the execution belongs to." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the activity the execution currently executes." + }, + "signalEventSubscriptionName": { + "type": "string", + "nullable": true, + "description": "Select only those executions that expect a signal of the given name." + }, + "messageEventSubscriptionName": { + "type": "string", + "nullable": true, + "description": "Select only those executions that expect a message of the given name." + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Only include active executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Only include suspended executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + "incidentId": { + "type": "string", + "nullable": true, + "description": "Filter by the incident id." + }, + "incidentType": { + "type": "string", + "nullable": true, + "description": "Filter by the incident type. See the [User Guide](/manual/develop/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + "incidentMessage": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message. Exact match." + }, + "incidentMessageLike": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message that the parameter is a substring of." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. An execution must have one of the given\ntenant ids." + }, + "variables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "An array to only include executions that have variables with certain values.\n\nThe array consists of objects with the three properties `name`, `operator`\nand `value`.\n`name (String)` is the variable name, `operator (String)` is the comparison\noperator to be used and `value` the variable value.\n`value` may be `String`, `Number` or `Boolean`.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` -\ngreater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or\nequal to;\n`like`." + }, + "processVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "An array to only include executions that belong to a process instance with variables\nwith certain values.\n\nThe array consists of objects with the three properties `name`, `operator`\nand `value`.\n`name (String)` is the variable name, `operator (String)` is the comparison\noperator to be used and `value` the variable value.\n`value` may be `String`, `Number` or `Boolean`.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to." + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable names provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable values provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Has no effect for the `/count` endpoint", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "instanceId", + "definitionKey", + "definitionId", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "ExecutionTriggerDto": { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs. Each key is a variable name and\neach value a JSON variable value object." + } + } + }, + "ExtendLockOnExternalTaskDto": { + "allOf": [ + { + "type": "object", + "properties": { + "newDuration": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "An amount of time (in milliseconds). This is the new lock duration starting from the\ncurrent moment." + } + } + }, + { + "$ref": "#/components/schemas/HandleExternalTaskDto" + } + ] + }, + "ExternalTaskBpmnError": { + "allOf": [ + { + "type": "object", + "properties": { + "workerId": { + "type": "string", + "nullable": true, + "description": "The id of the worker that reports the failure. Must match the id of the worker who has most recently\nlocked the task." + } + } + }, + { + "$ref": "#/components/schemas/TaskBpmnErrorDto" + } + ] + }, + "ExternalTaskDto": { + "title": "ExternalTaskDto", + "type": "object", + "description": "An External Task object with the following properties", + "properties": { + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this external task belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance that the external task belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "The full error message submitted with the latest reported failure executing this task; `null` if no\nfailure was reported previously or if no error message was submitted" + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution that the external task belongs to." + }, + "id": { + "type": "string", + "nullable": true, + "description": "The id of the external task." + }, + "lockExpirationTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date that the task\u0027s most recent lock expires or has expired." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the external task is defined in." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition the external task is defined in." + }, + "processDefinitionVersionTag": { + "type": "string", + "nullable": true, + "description": "The version tag of the process definition the external task is defined in." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the external task belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant the external task belongs to." + }, + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries the task currently has left." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether the external task is suspended or not." + }, + "workerId": { + "type": "string", + "nullable": true, + "description": "The id of the worker that posesses or posessed the most recent lock." + }, + "topicName": { + "type": "string", + "nullable": true, + "description": "The topic name of the external task." + }, + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The priority of the external task." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key of the process instance the external task belongs to." + } + } + }, + "ExternalTaskFailureDto": { + "allOf": [ + { + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An message indicating the reason of the failure." + }, + "errorDetails": { + "type": "string", + "nullable": true, + "description": "A detailed error description." + }, + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "A number of how often the task should be retried. Must be \u003e\u003d 0. If this is 0, an incident is created and\nthe task cannot be fetched anymore unless the retries are increased again. The incident\u0027s message is set\nto the `errorMessage` parameter." + }, + "retryTimeout": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "A timeout in milliseconds before the external task becomes available again for fetching. Must be \u003e\u003d 0." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object with the following properties:" + }, + "localVariables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing local variable key-value pairs. Local variables are set only in the scope of external task. Each key is a variable name and each value a JSON variable value object with the following properties:" + } + } + }, + { + "$ref": "#/components/schemas/HandleExternalTaskDto" + } + ] + }, + "ExternalTaskQueryDto": { + "title": "ExternalTaskQueryDto", + "type": "object", + "description": "A JSON object with the following properties:", + "properties": { + "externalTaskId": { + "type": "string", + "nullable": true, + "description": "Filter by an external task\u0027s id." + }, + "externalTaskIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the comma-separated list of external task ids." + }, + "topicName": { + "type": "string", + "nullable": true, + "description": "Filter by an external task topic." + }, + "workerId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + "locked": { + "type": "boolean", + "nullable": true, + "description": "Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired).\nValue may only be `true`, as `false` matches any external task." + }, + "notLocked": { + "type": "boolean", + "nullable": true, + "description": "Only include external tasks that are currently not locked (i.e., they have no lock or it has expired).\nValue may only be `true`, as `false` matches any external task." + }, + "withRetriesLeft": { + "type": "boolean", + "nullable": true, + "description": "Only include external tasks that have a positive (\u0026gt; 0) number of retries (or `null`). Value may only be\n`true`, as `false` matches any external task." + }, + "noRetriesLeft": { + "type": "boolean", + "nullable": true, + "description": "Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any\nexternal task." + }, + "lockExpirationAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to external tasks that have a lock that expires after a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "lockExpirationBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to external tasks that have a lock that expires before a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the activity that an external task is created for." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the comma-separated list of ids of the activities that an external task is created for." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the execution that an external task belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the process instance that an external task belongs to." + }, + "processInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process instance ids that an external task may belong to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the process definition that an external task belongs to." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nAn external task must have one of the given tenant ids." + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Only include active tasks. Value may only be `true`, as `false` matches any external task." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Only include suspended tasks. Value may only be `true`, as `false` matches any external task." + }, + "priorityHigherThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include jobs with a priority higher than or equal to the given value.\nValue must be a valid `long` value." + }, + "priorityLowerThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include jobs with a priority lower than or equal to the given value.\nValue must be a valid `long` value." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "A JSON array of criteria to sort the result by. Each element of the array is a JSON object that\n specifies one ordering. The position in the array identifies the rank of an ordering, i.e., whether\n it is primary, secondary, etc. The ordering objects have the following properties:\n\n **Note:** The `sorting` properties will not be applied to the External Task count query.", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "id", + "lockExpirationTime", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "taskPriority", + "createTime", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "FetchExternalTaskTopicDto": { + "type": "object", + "required": [ + "topicName", + "lockDuration" + ], + "properties": { + "topicName": { + "type": "string", + "description": "**Mandatory.** The topic\u0027s name." + }, + "lockDuration": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "**Mandatory.** The duration to lock the external tasks for in milliseconds." + }, + "variables": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A JSON array of `String` values that represent variable names. For each result task belonging to this\ntopic, the given variables are returned as well if they are accessible from the external task\u0027s\nexecution. If not provided - all variables will be fetched." + }, + "localVariables": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "If `true` only local variables will be fetched." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "A `String` value which enables the filtering of tasks based on process instance business key." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter tasks based on process definition id." + }, + "processDefinitionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter tasks based on process definition ids." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter tasks based on process definition key." + }, + "processDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter tasks based on process definition keys." + }, + "processDefinitionVersionTag": { + "type": "string", + "nullable": true, + "description": "Filter tasks based on process definition version tag." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Filter tasks without tenant id." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter tasks based on tenant ids." + }, + "processVariables": { + "type": "object", + "additionalProperties": true, + "description": "A `JSON` object used for filtering tasks based on process instance variable values. A property name of\nthe object represents a process variable name, while the property value represents the process variable\nvalue to filter tasks by." + }, + "deserializeValues": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on server side (default `false`).\n\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note\nthat this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format. For example, a\nvariable that is serialized as XML will be returned as a JSON string containing XML." + }, + "includeExtensionProperties": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Determines whether custom extension properties defined in the BPMN activity of the external task (e.g.\nvia the Extensions tab in the Camunda modeler) should be included in the response. Default: false" + } + } + }, + "FetchExternalTasksDto": { + "type": "object", + "required": [ + "workerId", + "maxTasks" + ], + "properties": { + "workerId": { + "type": "string", + "description": "**Mandatory.** The id of the worker on which behalf tasks are fetched. The returned tasks are locked for\nthat worker and can only be completed when providing the same worker id." + }, + "maxTasks": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "**Mandatory.** The maximum number of tasks to return." + }, + "usePriority": { + "type": "boolean", + "nullable": true, + "description": "A `boolean` value, which indicates whether the task should be fetched based on its priority\nor arbitrarily." + }, + "asyncResponseTimeout": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The [Long Polling](https://docs.camunda.org/manual/7.22/user-guide/process-engine/external-tasks/#long-polling-to-fetch-and-lock-external-tasks)\ntimeout in milliseconds.\n\n**Note:** The value cannot be set larger than 1.800.000 milliseconds (corresponds to 30 minutes)." + }, + "topics": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/FetchExternalTaskTopicDto" + }, + "description": "A JSON array of topic objects for which external tasks should be fetched. The returned tasks may be\narbitrarily distributed among these topics. Each topic object has the following properties:" + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "createTime" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "FilterDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the filter." + }, + "resourceType": { + "type": "string", + "nullable": true, + "description": "The resource type of the filter." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the filter." + }, + "owner": { + "type": "string", + "nullable": true, + "description": "The user id of the owner of the filter." + }, + "query": { + "type": "object", + "description": "The query of the filter as a JSON object." + }, + "properties": { + "type": "object", + "description": "The properties of a filter as a JSON object." + }, + "itemCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "\nThe number of items matched by the filter itself. Note: Only exists\nif the query parameter\n`itemCount` was set to `true`" + } + } + }, + "FormDto": { + "title": "FormDto", + "type": "object", + "properties": { + "key": { + "type": "string", + "nullable": true, + "description": "The form key." + }, + "camundaFormRef": { + "$ref": "#/components/schemas/CamundaFormRef" + }, + "contextPath": { + "type": "string", + "nullable": true, + "description": "The context path of the process application. If the task (or the process definition) does not\nbelong to a process application deployment or a process definition at all, this\nproperty is not set." + } + } + }, + "GroupDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the group." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the group." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of the group." + } + } + }, + "GroupQueryDto": { + "type": "object", + "description": "A group instance query which defines a list of group instances", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the group." + }, + "idIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a JSON string array of group ids." + }, + "name": { + "type": "string", + "nullable": true, + "description": "Filter by the name of the group." + }, + "nameLike": { + "type": "string", + "nullable": true, + "description": "Filter by the name that the parameter is a substring of." + }, + "type": { + "type": "string", + "nullable": true, + "description": "Filter by the type of the group." + }, + "member": { + "type": "string", + "nullable": true, + "description": "Only retrieve groups where the given user id is a member of." + }, + "memberOfTenant": { + "type": "string", + "nullable": true, + "description": "Only retrieve groups which are members of the given tenant." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "id", + "name", + "type" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HandleExternalTaskDto": { + "type": "object", + "properties": { + "workerId": { + "type": "string", + "description": "**Mandatory.** The ID of the worker who is performing the operation on the external task.\nIf the task is already locked, must match the id of the worker who has most recently\nlocked the task." + } + } + }, + "HistoricActivityInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance." + }, + "parentActivityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent activity instance, for example a sub process instance." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this object is an instance of." + }, + "activityName": { + "type": "string", + "nullable": true, + "description": "The name of the activity that this object is an instance of." + }, + "activityType": { + "type": "string", + "nullable": true, + "description": "The type of the activity that this object is an instance of." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition that this activity instance belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this activity instance belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance that this activity instance belongs to." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution that executed this activity instance." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task that is associated to this activity instance. Is only set if the activity is a user task." + }, + "assignee": { + "type": "string", + "nullable": true, + "description": "The assignee of the task that is associated to this activity instance. Is only set if the activity is a user task." + }, + "calledProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the called process instance. Is only set if the activity is a call activity and the called instance a process instance." + }, + "calledCaseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the called case instance. Is only set if the activity is a call activity and the called instance a case instance." + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the instance was started. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the instance ended. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "durationInMillis": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The time the instance took to finish (in milliseconds)." + }, + "canceled": { + "type": "boolean", + "nullable": true, + "description": "If `true`, this activity instance is canceled." + }, + "completeScope": { + "type": "boolean", + "nullable": true, + "description": "If `true`, this activity instance did complete a BPMN 2.0 scope." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the activity instance." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the activity instance should be removed by the History Cleanup job. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process containing this activity instance." + } + } + }, + "HistoricActivityInstanceQueryDto": { + "type": "object", + "description": "A historic activity instance query which defines a group of historic activity instances", + "properties": { + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by activity instance id." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by process definition id." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the execution that executed the activity instance." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Filter by the activity id (according to BPMN 2.0 XML)." + }, + "activityName": { + "type": "string", + "nullable": true, + "description": "Filter by the activity name (according to BPMN 2.0 XML)." + }, + "activityType": { + "type": "string", + "nullable": true, + "description": "Filter by activity type." + }, + "taskAssignee": { + "type": "string", + "nullable": true, + "description": "Only include activity instances that are user tasks and assigned to a given user." + }, + "finished": { + "type": "boolean", + "nullable": true, + "description": "Only include finished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + "unfinished": { + "type": "boolean", + "nullable": true, + "description": "Only include unfinished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + "canceled": { + "type": "boolean", + "nullable": true, + "description": "Only include canceled activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + "completeScope": { + "type": "boolean", + "nullable": true, + "description": "Only include activity instances which completed a scope.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + "startedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Must be a JSON array of Strings. An activity instance must have one of the given tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic activity instances that belong to no tenant. Value may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "activityInstanceId", + "instanceId", + "executionId", + "activityId", + "activityName", + "activityType", + "startTime", + "endTime", + "duration", + "definitionId", + "occurrence", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricActivityStatisticsDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the activity the results are aggregated for." + }, + "instances": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of all running instances of the activity." + }, + "canceled": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of all canceled instances of the activity. **Note:** Will be `0`\n(not `null`), if canceled activity instances were excluded." + }, + "finished": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of all finished instances of the activity. **Note:** Will be `0`\n(not `null`), if finished activity instances were excluded." + }, + "completeScope": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of all instances which completed a scope of the activity.\n**Note:** Will be `0` (not `null`), if activity instances which\ncompleted a scope were excluded." + }, + "openIncidents": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of open incidents for the activity. **Note:** Will be `0` (not\n`null`), if `incidents` is set to `false`." + }, + "resolvedIncidents": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of resolved incidents for the activity. **Note:** Will be `0` (not\n`null`), if `incidents` is set to `false`." + }, + "deletedIncidents": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of deleted incidents for the activity. **Note:** Will be `0` (not\n`null`), if `incidents` is set to `false`." + } + } + }, + "HistoricBatchDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the batch." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of the batch. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + "totalJobs": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "\nThe total jobs of a batch is the number of batch execution\njobs required to complete the batch.\n" + }, + "batchJobsPerSeed": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "\nThe number of batch execution jobs created per seed job invocation.\nThe batch seed job is invoked until it has created all batch\nexecution jobs required by the batch (see `totalJobs` property).\n" + }, + "invocationsPerBatchJob": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "\nEvery batch execution job invokes the command executed by the batch\n`invocationsPerBatchJob` times. E.g., for a process instance\nmigration batch this specifies the number of process instances\nwhich are migrated per batch execution job.\n" + }, + "seedJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the seed jobs of this batch." + }, + "monitorJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the monitor jobs of this batch." + }, + "batchJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the batch execution jobs of this batch." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the batch." + }, + "createUserId": { + "type": "string", + "nullable": true, + "description": "The batch creator\u0027s user id." + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the batch was started. Default format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`.\nFor further information, please see the [documentation](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "executionStartTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the batch execution was started, i.e., at least one batch job has been executed. Default format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`. For further information, please see the [documentation]\n(https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the batch ended. Default format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`.\nFor further information, please see the [documentation](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the historic batch should be removed by the History Cleanup\njob. Default format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`.\nFor further information, please see the [documentation](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + } + } + }, + "HistoricBatchQueryDto": { + "type": "object", + "description": "Query for the historic batches to set the removal time for.", + "properties": { + "batchId": { + "type": "string", + "nullable": true, + "description": "Filter by batch id." + }, + "type": { + "type": "string", + "nullable": true, + "description": "Filter by batch type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + "completed": { + "type": "boolean", + "nullable": true, + "description": "\nFilter completed or not completed batches. If the value is\n`true`, only completed batches, i.e., end time is set, are\nreturned. Otherwise, if the value is `false`, only running\nbatches, i.e., end time is null, are returned." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A batch matches if it has one of the given\ntenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include batches which belong to no tenant. Value can effectively only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Has no effect for the `/count` endpoint", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "batchId", + "startTime", + "endTime", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricDecisionInputInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision input value." + }, + "decisionInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the decision instance the input value belongs to." + }, + "clauseId": { + "type": "string", + "nullable": true, + "description": "The id of the clause the input value belongs to." + }, + "clauseName": { + "type": "string", + "nullable": true, + "description": "The name of the clause the input value belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message in case a Java Serialized Object could not be de-serialized." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The value type of the variable." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the variable was inserted. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the entry should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this entry." + }, + "value": { + "type": "object", + "description": "The variable\u0027s value. Value differs depending on the variable\u0027s type\nand on the `disableCustomObjectDeserialization` parameter." + }, + "valueInfo": { + "type": "object", + "additionalProperties": true, + "description": "A JSON object containing additional, value-type-dependent\nproperties.\n\nFor variables of type `Object`, the following properties are\nreturned:\n\n* `objectTypeName`: A string representation of the object\u0027s type\nname.\n\n* `serializationDataFormat`: The serialization format used to store\nthe variable." + } + } + }, + "HistoricDecisionInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision instance." + }, + "decisionDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the decision definition that this decision instance belongs to." + }, + "decisionDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the decision definition that this decision instance belongs to." + }, + "decisionDefinitionName": { + "type": "string", + "nullable": true, + "description": "The name of the decision definition that this decision instance belongs to." + }, + "evaluationTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the instance was evaluated. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the instance should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this decision instance belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition that this decision instance belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance that this decision instance belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the case definition that this decision instance belongs to." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the case definition that this decision instance belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance that this decision instance belongs to." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this decision instance belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance that this decision instance belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the historic decision instance." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the authenticated user that has evaluated this decision instance without\na process or case instance." + }, + "inputs": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/HistoricDecisionInputInstanceDto" + }, + "description": "The list of decision input values. **Only exists** if `includeInputs`\nwas set to `true` in the query." + }, + "outputs": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/HistoricDecisionOutputInstanceDto" + }, + "description": "The list of decision output values. **Only exists** if `includeOutputs`\nwas set to `true` in the query." + }, + "collectResultValue": { + "type": "number", + "format": "double", + "nullable": true, + "description": "The result of the collect aggregation of the decision result if used. `null` if no\naggregation was used." + }, + "rootDecisionInstanceId": { + "type": "string", + "nullable": true, + "description": "The decision instance id of the evaluated root decision. Can be `null` if this\ninstance is the root decision instance of the evaluation." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the evaluation\nof this decision. Can be `null` if this decision instance is not\nevaluated as part of a BPMN process." + }, + "decisionRequirementsDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the decision requirements definition that this decision instance belongs\nto." + }, + "decisionRequirementsDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the decision requirements definition that this decision instance belongs\nto." + } + } + }, + "HistoricDecisionInstanceQueryDto": { + "type": "object", + "description": "A historic decision instance query which defines a list of historic decision instances", + "properties": { + "decisionInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by decision instance id." + }, + "decisionInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by decision instance ids. Must be a comma-separated list of decision instance ids." + }, + "decisionDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the decision definition the instances belongs to." + }, + "decisionDefinitionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the decision definitions the instances belongs to. Must be a\ncomma-separated list of decision definition ids." + }, + "decisionDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the decision definition the instances belongs to." + }, + "decisionDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the keys of the decision definition the instances belongs to. Must be a comma-\nseparated list of decision definition keys." + }, + "decisionDefinitionName": { + "type": "string", + "nullable": true, + "description": "Filter by the name of the decision definition the instances belongs to." + }, + "decisionDefinitionNameLike": { + "type": "string", + "nullable": true, + "description": "Filter by the name of the decision definition the instances belongs to, that the parameter\nis a substring of." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the process definition the instances belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the process definition the instances belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the process instance the instances belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the case definition the instances belongs to." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the case definition the instances belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the case instance the instances belongs to." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the activity ids the instances belongs to.\nMust be a comma-separated list of acitvity ids." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the activity instance ids the instances belongs to.\nMust be a comma-separated list of acitvity instance ids." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A historic decision instance must have one\nof the given tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic decision instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + "evaluatedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were evaluated before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "evaluatedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were evaluated after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "Restrict to instances that were evaluated by the given user." + }, + "rootDecisionInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict to instances that have a given root decision instance id.\nThis also includes the decision instance with the given id." + }, + "rootDecisionInstancesOnly": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances those are the root decision instance of an evaluation.\nValue may only be `true`, as `false` is the default behavior." + }, + "decisionRequirementsDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the decision requirements definition the instances belongs to." + }, + "decisionRequirementsDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the decision requirements definition the instances belongs to." + }, + "includeInputs": { + "type": "boolean", + "nullable": true, + "description": "Include input values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + "includeOutputs": { + "type": "boolean", + "nullable": true, + "description": "Include output values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + "disableBinaryFetching": { + "type": "boolean", + "nullable": true, + "description": "Disables fetching of byte array input and output values.\nValue may only be `true`, as `false` is the default behavior." + }, + "disableCustomObjectDeserialization": { + "type": "boolean", + "nullable": true, + "description": "Disables deserialization of input and output values that are custom objects.\nValue may only be `true`, as `false` is the default behavior." + } + } + }, + "HistoricDecisionInstanceStatisticsDto": { + "type": "object", + "properties": { + "decisionDefinitionKey": { + "type": "string", + "nullable": true, + "description": "A key of decision definition." + }, + "evaluations": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "A number of evaluation for decision definition." + } + } + }, + "HistoricDecisionOutputInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision output value." + }, + "decisionInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the decision instance the output value belongs to." + }, + "clauseId": { + "type": "string", + "nullable": true, + "description": "The id of the clause the output value belongs to." + }, + "clauseName": { + "type": "string", + "nullable": true, + "description": "The name of the clause the output value belongs to." + }, + "ruleId": { + "type": "string", + "nullable": true, + "description": "The id of the rule the output value belongs to." + }, + "ruleOrder": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The order of the rule the output value belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message in case a Java Serialized Object could not be de-serialized." + }, + "variableName": { + "type": "string", + "nullable": true, + "description": "The name of the output variable." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The value type of the variable." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the variable was inserted. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the entry should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this entry." + }, + "value": { + "type": "object", + "description": "The variable\u0027s value. Value differs depending on the variable\u0027s type\nand on the `disableCustomObjectDeserialization` parameter." + }, + "valueInfo": { + "type": "object", + "additionalProperties": true, + "description": "A JSON object containing additional, value-type-dependent\nproperties.\n\nFor variables of type `Object`, the following properties are\nreturned:\n\n* `objectTypeName`: A string representation of the object\u0027s type\nname.\n\n* `serializationDataFormat`: The serialization format used to store\nthe variable." + } + } + }, + "HistoricDetailDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the historic detail." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of the historic detail. Either `formField` for a submitted form field\nvalue or `variableUpdate` for variable updates." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition that this historic detail belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this historic detail belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the historic detail belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance the historic detail belongs to." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution the historic detail belongs to." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the case definition that this historic detail belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the case definition that this historic detail belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance the historic detail belongs to." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "The id of the case execution the historic detail belongs to." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task the historic detail belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant that this historic detail belongs to." + }, + "userOperationId": { + "type": "string", + "nullable": true, + "description": "The id of user operation which links historic detail with\n[user operation log](https://docs.camunda.org/manual/7.22/reference/rest/history/user-operation-log/)\nentries." + }, + "time": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when this historic detail occurred. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the historic detail should be removed by the History Cleanup job.\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this historic detail." + }, + "fieldId": { + "type": "string", + "nullable": true, + "description": "The id of the form field.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `formField`." + }, + "fieldValue": { + "type": "object", + "description": "The submitted form field value. The value differs depending on the form field\u0027s type\nand on the `deserializeValue` parameter.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `formField`." + }, + "variableName": { + "type": "string", + "nullable": true, + "description": "The name of the variable which has been updated.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "variableInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the associated variable instance.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "variableType": { + "type": "string", + "nullable": true, + "description": "The value type of the variable.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "value": { + "type": "object", + "description": "The variable\u0027s value. Value differs depending on the variable\u0027s type\nand on the deserializeValues parameter.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "valueInfo": { + "type": "object", + "additionalProperties": true, + "description": "A JSON object containing additional, value-type-dependent properties.\nFor variables of type `Object`, the following properties are returned:\n\n* `objectTypeName`: A string representation of the object\u0027s type name.\n* `serializationDataFormat`: The serialization format used to store the variable.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "initial": { + "type": "boolean", + "nullable": true, + "description": "Returns `true` for variable updates that contains the initial values of the variables.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "revision": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The revision of the historic variable update.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message in case a Java Serialized Object\ncould not be de-serialized.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + } + } + }, + "HistoricDetailQueryDto": { + "type": "object", + "description": "A historic detail query which defines a group of historic details.", + "properties": { + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "processInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic details which belong to one of the passed process instance ids." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Filter by execution id." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "Filter by task id." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by activity instance id." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by case instance id." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "Filter by case execution id." + }, + "variableInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by variable instance id." + }, + "variableTypeIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic details where the variable updates belong to one of the passed \nlist of variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type `serializable`." + }, + "variableNameLike": { + "type": "string", + "nullable": true, + "description": "Filter by variable name like. Example usage: `variableNameLike(%camunda%)`. The query will match the names of variables in a case-insensitive way." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic details that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + "userOperationId": { + "type": "string", + "nullable": true, + "description": "Filter by a user operation id." + }, + "formFields": { + "type": "boolean", + "nullable": true, + "description": "Only include `HistoricFormFields`. Value may only be `true`, as `false` is the default behavior." + }, + "variableUpdates": { + "type": "boolean", + "nullable": true, + "description": "Only include `HistoricVariableUpdates`. Value may only be `true`, as `false` is the default behavior." + }, + "excludeTaskDetails": { + "type": "boolean", + "nullable": true, + "description": "Excludes all task-related `HistoricDetails`, so only items which have no task id set will be selected.\nWhen this parameter is used together with `taskId`, this call is ignored and task details are not excluded.\nValue may only be `true`, as `false` is the default behavior." + }, + "initial": { + "type": "boolean", + "nullable": true, + "description": "Restrict to historic variable updates that contain only initial variable values.\nValue may only be `true`, as `false` is the default behavior." + }, + "occurredBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to historic details that occured before the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + }, + "occurredAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to historic details that occured after the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "A JSON array of criteria to sort the result by. Each element of the array is\n a JSON object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Does not have an effect for the `count` endpoint.", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "processInstanceId", + "variableName", + "variableType", + "variableRevision", + "formPropertyId", + "time", + "occurrence", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricExternalTaskLogDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the log entry." + }, + "externalTaskId": { + "type": "string", + "nullable": true, + "description": "The id of the external task." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when the log entry has been written." + }, + "topicName": { + "type": "string", + "nullable": true, + "description": "The topic name of the associated external task." + }, + "workerId": { + "type": "string", + "nullable": true, + "description": "The id of the worker that posessed the most recent lock." + }, + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries the associated external task has left." + }, + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The execution priority the external task had when the log entry was created." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "The message of the error that occurred by executing the associated external task." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the associated external task was created." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance on which the associated external task was created." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution id on which the associated external task was created." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance on which the associated external task was created." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition which the associated external task belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition which the associated external task belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant that this historic external task log entry belongs to." + }, + "creationLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the creation of the associated\nexternal task." + }, + "failureLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the failed execution of the\nassociated external task." + }, + "successLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the successful execution of the\nassociated external task." + }, + "deletionLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the deletion of the associated\nexternal task." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which this log should be removed by the History Cleanup job. Default\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`. For further information, please see the [documentation](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this log." + } + } + }, + "HistoricExternalTaskLogQueryDto": { + "type": "object", + "description": "A Historic External Task Log instance query which defines a list of Historic External Task Log instances", + "properties": { + "logId": { + "type": "string", + "nullable": true, + "description": "Filter by historic external task log id." + }, + "externalTaskId": { + "type": "string", + "nullable": true, + "description": "Filter by external task id." + }, + "topicName": { + "type": "string", + "nullable": true, + "description": "Filter by an external task topic." + }, + "workerId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "Filter by external task exception message." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity ids." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity\ninstance ids." + }, + "executionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed execution ids." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by process definition id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by process definition key." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic external task log entries which belong to one of the passed and\ncomma-separated tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic external task log entries that belong to no tenant. Value may only\nbe `true`, as `false` is the default behavior." + }, + "priorityLowerThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include logs for which the associated external task had a priority lower than or\nequal to the given value. Value must be a valid `long` value." + }, + "priorityHigherThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include logs for which the associated external task had a priority higher than or\nequal to the given value. Value must be a valid `long` value." + }, + "creationLog": { + "type": "boolean", + "nullable": true, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + "failureLog": { + "type": "boolean", + "nullable": true, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + "successLog": { + "type": "boolean", + "nullable": true, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + "deletionLog": { + "type": "boolean", + "nullable": true, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Sorting has no effect for `count` endpoints.", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "timestamp", + "externalTaskId", + "topicName", + "workerId", + "retries", + "priority", + "activityId", + "activityInstanceId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricIdentityLinkLogDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "Id of the Historic identity link entry." + }, + "time": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when the identity link is logged. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of identity link (candidate/assignee/owner)." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user/assignee." + }, + "groupId": { + "type": "string", + "nullable": true, + "description": "The id of the group." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition." + }, + "operationType": { + "type": "string", + "nullable": true, + "description": "Type of operation (add/delete)." + }, + "assignerId": { + "type": "string", + "nullable": true, + "description": "The id of the assigner." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the identity link should be removed by the History Cleanup job. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this identity link." + } + } + }, + "HistoricIncidentDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the incident." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition this incident is associated with." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition this incident is associated with." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The key of the process definition this incident is associated with." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution this incident is associated with." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this incident." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time this incident happened. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time this incident has been deleted or resolved. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the incident should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "incidentType": { + "type": "string", + "nullable": true, + "description": "The type of incident, for example: `failedJobs` will be returned in case of an\nincident which identified a failed job during the execution of a\nprocess instance. See the [User Guide](/manual/develop/user-\nguide/process-engine/incidents/#incident-types) for a list of\nincident types." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity this incident is associated with." + }, + "failedActivityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the last exception occurred." + }, + "causeIncidentId": { + "type": "string", + "nullable": true, + "description": "The id of the associated cause incident which has been triggered." + }, + "rootCauseIncidentId": { + "type": "string", + "nullable": true, + "description": "The id of the associated root cause incident which has been triggered." + }, + "configuration": { + "type": "string", + "nullable": true, + "description": "The payload of this incident." + }, + "historyConfiguration": { + "type": "string", + "nullable": true, + "description": "The payload of this incident at the time when it occurred." + }, + "incidentMessage": { + "type": "string", + "nullable": true, + "description": "The message of this incident." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant this incident is associated with." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id the incident is associated with." + }, + "open": { + "type": "boolean", + "nullable": true, + "description": "If true, this incident is open." + }, + "deleted": { + "type": "boolean", + "nullable": true, + "description": "If true, this incident has been deleted." + }, + "resolved": { + "type": "boolean", + "nullable": true, + "description": "If true, this incident has been resolved." + }, + "annotation": { + "type": "string", + "nullable": true, + "description": "The annotation set to the incident." + } + } + }, + "HistoricJobLogDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the log entry." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when the log entry has been written." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the log entry should be removed by the History Cleanup job.\nDefault format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`. For further info see the\n[docs](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "jobId": { + "type": "string", + "nullable": true, + "description": "The id of the associated job." + }, + "jobDueDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date on which the associated job is supposed to be processed." + }, + "jobRetries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries the associated job has left." + }, + "jobPriority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The execution priority the job had when the log entry was created." + }, + "jobExceptionMessage": { + "type": "string", + "nullable": true, + "description": "The message of the exception that occurred by executing the associated job." + }, + "failedActivityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the last exception occurred by executing the\nassociated job." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the job definition on which the associated job was created." + }, + "jobDefinitionType": { + "type": "string", + "nullable": true, + "description": "The job definition type of the associated job. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job definition types." + }, + "jobDefinitionConfiguration": { + "type": "string", + "nullable": true, + "description": "The job definition configuration type of the associated job." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the associated job was created." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution id on which the associated job was created." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance on which the associated job was created." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition which the associated job belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition which the associated job belongs to." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The id of the deployment which the associated job belongs to." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\nwhich the associated job belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant that this historic job log entry belongs to." + }, + "hostname": { + "type": "string", + "nullable": true, + "description": "\nThe name of the host of the Process Engine where the\njob of this historic job log entry was executed." + }, + "batchId": { + "type": "string", + "nullable": true, + "description": "The ID of the batch associated with this job. `null` if no batch is associated with this job. The\nfollowing jobs are associated with batches:\n* Seed Jobs\n* Monitor Jobs\n* Batch Execution Jobs" + }, + "creationLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the creation of the associated job." + }, + "failureLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the failed execution of the\nassociated job." + }, + "successLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the successful execution of the\nassociated job." + }, + "deletionLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the deletion of the associated job." + } + } + }, + "HistoricJobLogQueryDto": { + "type": "object", + "description": "A Historic Job Log instance query which defines a list of Historic Job Log instances", + "properties": { + "logId": { + "type": "string", + "nullable": true, + "description": "Filter by historic job log id." + }, + "jobId": { + "type": "string", + "nullable": true, + "description": "Filter by job id." + }, + "jobExceptionMessage": { + "type": "string", + "nullable": true, + "description": "Filter by job exception message." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by job definition id." + }, + "jobDefinitionType": { + "type": "string", + "nullable": true, + "description": "Filter by job definition type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job definition types." + }, + "jobDefinitionConfiguration": { + "type": "string", + "nullable": true, + "description": "Filter by job definition configuration." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed activity ids." + }, + "failedActivityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic job logs which belong to failures of one of the passed activity ids." + }, + "executionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed execution ids." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by process definition id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by process definition key." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "Filter by deployment id." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic job log entries which belong to one of the passed and comma-\nseparated tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic job log entries that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + "hostname": { + "type": "string", + "nullable": true, + "description": "Filter by hostname." + }, + "jobPriorityLowerThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include logs for which the associated job had a priority lower than or equal to the\ngiven value. Value must be a valid `long` value." + }, + "jobPriorityHigherThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include logs for which the associated job had a priority higher than or equal to the\ngiven value. Value must be a valid `long` value." + }, + "creationLog": { + "type": "boolean", + "nullable": true, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + "failureLog": { + "type": "boolean", + "nullable": true, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + "successLog": { + "type": "boolean", + "nullable": true, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + "deletionLog": { + "type": "boolean", + "nullable": true, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Sorting has no effect for `count` endpoints", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "timestamp", + "jobId", + "jobDefinitionId", + "jobDueDate", + "jobRetries", + "jobPriority", + "activityId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "deploymentId", + "hostname", + "occurrence", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricProcessInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the process instance." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process." + }, + "superProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent process instance, if it exists." + }, + "superCaseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent case instance, if it exists." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent case instance, if it exists." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "The name of the process definition that this process instance belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition that this process instance belongs to." + }, + "processDefinitionVersion": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the process definition that this process instance belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this process instance belongs to." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key of the process instance." + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the instance was started. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the instance ended. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the instance should be removed by the History Cleanup job. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "durationInMillis": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The time the instance took to finish (in milliseconds)." + }, + "startUserId": { + "type": "string", + "nullable": true, + "description": "The id of the user who started the process instance." + }, + "startActivityId": { + "type": "string", + "nullable": true, + "description": "The id of the initial activity that was executed (e.g., a start event)." + }, + "deleteReason": { + "type": "string", + "nullable": true, + "description": "The provided delete reason in case the process instance was canceled during execution." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the process instance." + }, + "state": { + "type": "string", + "nullable": true, + "enum": [ + "ACTIVE", + "SUSPENDED", + "COMPLETED", + "EXTERNALLY_TERMINATED", + "INTERNALLY_TERMINATED" + ], + "description": "Last state of the process instance, possible values are:\n\n`ACTIVE` - running process instance\n\n`SUSPENDED` - suspended process instances\n\n`COMPLETED` - completed through normal end event\n\n`EXTERNALLY_TERMINATED` - terminated externally, for instance through REST API\n\n`INTERNALLY_TERMINATED` - terminated internally, for instance by terminating boundary event" + }, + "restartedProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the original process instance which was restarted." + } + } + }, + "HistoricProcessInstanceQueryDto": { + "type": "object", + "description": "A historic process instance query which defines a group of historic process instances", + "properties": { + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by process instance ids. Must be a JSON array of `Strings`." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the process definition the instances run on." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the process definition the instances run on." + }, + "processDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Must be a JSON array of `Strings`." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "Filter by the name of the process definition the instances run on." + }, + "processDefinitionNameLike": { + "type": "string", + "nullable": true, + "description": "Filter by process definition names that the parameter is a substring of." + }, + "processDefinitionKeyNotIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Exclude instances that belong to a set of process definitions. Must be a JSON array of `Strings`." + }, + "processInstanceBusinessKey": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key." + }, + "processInstanceBusinessKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of business keys. A process instance must have one of the given business keys. Must be a JSON array of `Strings`" + }, + "processInstanceBusinessKeyLike": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + "rootProcessInstances": { + "type": "boolean", + "nullable": true, + "description": "Restrict the query to all process instances that are top level process instances." + }, + "finished": { + "type": "boolean", + "nullable": true, + "description": "Only include finished process instances. This flag includes all process instances\nthat are completed or terminated. Value may only be `true`, as `false` is the default behavior." + }, + "unfinished": { + "type": "boolean", + "nullable": true, + "description": "Only include unfinished process instances. Value may only be `true`, as `false` is the default behavior." + }, + "withIncidents": { + "type": "boolean", + "nullable": true, + "description": "Only include process instances which have an incident. Value may only be `true`, as `false` is the default behavior." + }, + "withRootIncidents": { + "type": "boolean", + "nullable": true, + "description": "Only include process instances which have a root incident. Value may only be `true`, as `false` is the default behavior." + }, + "incidentIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to instances that have an incident with one of the given ids. Must be a JSON array of `Strings`" + }, + "incidentType": { + "type": "string", + "nullable": true, + "description": "Filter by the incident type. See the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + "incidentStatus": { + "type": "string", + "nullable": true, + "enum": [ + "open", + "resolved" + ], + "description": "Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents." + }, + "incidentMessage": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message. Exact match." + }, + "incidentMessageLike": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message that the parameter is a substring of." + }, + "startedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were started before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were started after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were finished before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were finished after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedActivityAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that executed an activity after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedActivityBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that executed an activity before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedJobAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that executed an job after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedJobBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that executed an job before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedBy": { + "type": "string", + "nullable": true, + "description": "Only include process instances that were started by the given user." + }, + "superProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id." + }, + "subProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict query to one process instance that has a sub process instance with the given id." + }, + "superCaseInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + "subCaseInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict query to one process instance that has a sub case instance with the given id." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Must be a JSON array of `Strings`" + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic process instances which belong to no tenant. Value may only be `true`, as `false` is the default behavior." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to instances with an active activity with one of the given ids. This filter behaves differently as `activeActivityIdIn` since it also yields results when filtering for activities with an incident. Must be a JSON array of `Strings`" + }, + "executedActivityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to instances that executed an activity with one of given ids. Must be a JSON array of `Strings`" + }, + "activeActivityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to instances that have an active activity with one of given ids. Must be a JSON array of `Strings`" + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances that are active." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances that are suspended." + }, + "completed": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances that are completed." + }, + "externallyTerminated": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances that are externallyTerminated." + }, + "internallyTerminated": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances that are internallyTerminated." + }, + "variables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "A JSON array to only include process instances that have/had variables with certain values.\nThe array consists of objects with the three properties `name`, `operator` and `value`. `name` (`String`) is the variable name,\n`operator` (`String`) is the comparison operator to be used and `value` the variable value.\n\nValue may be `String`, `Number` or `Boolean`.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`.\n" + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable names provided in variables case-insensitively. If set to `true` variableName and variablename are treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable values provided in variables case-insensitively. If set to `true` variableValue and variablevalue are treated as equal." + }, + "orQueries": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "description": "A JSON array of nested historic process instance queries with OR semantics.\n\nA process instance matches a nested query if it fulfills at least one of the query\u0027s predicates.\n\nWith multiple nested queries, a process instance must fulfill at least one predicate of each query\n([Conjunctive Normal Form](https://en.wikipedia.org/wiki/Conjunctive_normal_form)).\n\nAll process instance query properties can be used except for: `sorting`\n\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-engine-api/#or-queries) for more information about OR queries." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "instanceId", + "definitionId", + "definitionKey", + "definitionName", + "definitionVersion", + "businessKey", + "startTime", + "endTime", + "duration", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricTaskInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The task id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition the task belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the task belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the task belongs to." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution the task belongs to." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the case definition the task belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the case definition the task belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance the task belongs to." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "The id of the case execution the task belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this object is an instance of." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The task name." + }, + "description": { + "type": "string", + "nullable": true, + "description": "The task\u0027s description." + }, + "deleteReason": { + "type": "string", + "nullable": true, + "description": "The task\u0027s delete reason." + }, + "owner": { + "type": "string", + "nullable": true, + "description": "The owner\u0027s id." + }, + "assignee": { + "type": "string", + "nullable": true, + "description": "The assignee\u0027s id." + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the task was started. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the task ended. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "duration": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The time the task took to finish (in milliseconds)." + }, + "taskDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The task\u0027s key." + }, + "priority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The task\u0027s priority." + }, + "due": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The task\u0027s due date. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "parentTaskId": { + "type": "string", + "nullable": true, + "description": "The id of the parent task, if this task is a subtask." + }, + "followUp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The follow-up date for the task. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the task instance." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the task should be removed by the History Cleanup job. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this task." + } + } + }, + "HistoricTaskInstanceQueryDto": { + "type": "object", + "description": "A Historic Task instance query which defines a list of Historic Task instances", + "properties": { + "taskId": { + "type": "string", + "nullable": true, + "description": "Filter by task id." + }, + "taskParentTaskId": { + "type": "string", + "nullable": true, + "description": "Filter by parent task id." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by root process instance id." + }, + "processInstanceBusinessKey": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key." + }, + "processInstanceBusinessKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by process instances with one of the give business keys.\nThe keys need to be in a comma-separated list." + }, + "processInstanceBusinessKeyLike": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key that has the parameter value as a substring." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the execution that executed the task." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by process definition id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by case instance id." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the case execution that executed the task." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by case definition id." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + "caseDefinitionName": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed activity instance ids." + }, + "taskName": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given name." + }, + "taskNameLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + "taskDescription": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given description." + }, + "taskDescriptionLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a description that has the parameter value as a substring." + }, + "taskDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given key." + }, + "taskDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the passed task definition keys." + }, + "taskDeleteReason": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given delete reason." + }, + "taskDeleteReasonLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a delete reason that has the parameter value as a substring." + }, + "taskAssignee": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the given user is assigned to." + }, + "taskAssigneeLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are assigned to users with the parameter value as a substring." + }, + "taskOwner": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the given user owns." + }, + "taskOwnerLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are owned by users with the parameter value as a substring." + }, + "taskPriority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Restrict to tasks that have the given priority." + }, + "assigned": { + "type": "boolean", + "nullable": true, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + "unassigned": { + "type": "boolean", + "nullable": true, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + "finished": { + "type": "boolean", + "nullable": true, + "description": "Only include finished tasks. Value may only be `true`, as `false` is the default behavior." + }, + "unfinished": { + "type": "boolean", + "nullable": true, + "description": "Only include unfinished tasks. Value may only be `true`, as `false` is the default\nbehavior." + }, + "processFinished": { + "type": "boolean", + "nullable": true, + "description": "Only include tasks of finished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "processUnfinished": { + "type": "boolean", + "nullable": true, + "description": "Only include tasks of unfinished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "taskDueDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "taskDueDateBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "taskDueDateAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "withoutTaskDueDate": { + "type": "boolean", + "nullable": true, + "description": "Only include tasks which have no due date. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "taskFollowUpDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have a followUp date on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "taskFollowUpDateBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have a followUp date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "taskFollowUpDateAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have a followUp date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. A task instance must have one of the given\ntenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic task instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + "taskVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "Only include tasks that have variables with certain values. Variable filtering expressions are\ncomma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + "processVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "Only include tasks that belong to process instances that have variables with certain\nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`;\n* `notLike`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match the variable name provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match the variable value provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + }, + "taskInvolvedUser": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks with a historic identity link to the given user." + }, + "taskInvolvedGroup": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks with a historic identity link to the given group." + }, + "taskHadCandidateUser": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks with a historic identity link to the given candidate user." + }, + "taskHadCandidateGroup": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks with a historic identity link to the given candidate group." + }, + "withCandidateGroups": { + "type": "boolean", + "nullable": true, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + "withoutCandidateGroups": { + "type": "boolean", + "nullable": true, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + "orQueries": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/HistoricTaskInstanceQueryDto" + }, + "description": "A JSON array of nested historic task instance queries with OR semantics.\n\nA task instance matches a nested query if it fulfills at least one of the query\u0027s predicates.\n\nWith multiple nested queries, a task instance must fulfill at least one predicate of each query\n([Conjunctive Normal Form](https://en.wikipedia.org/wiki/Conjunctive_normal_form)).\n\nAll task instance query properties can be used except for: `sorting`, `withCandidateGroups`, ` withoutCandidateGroups`.\n\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-engine-api/#or-queries) for more information about OR queries." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Sorting has no effect for `count` endpoints", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "taskId", + "activityInstanceId", + "processDefinitionId", + "processInstanceId", + "executionId", + "duration", + "endTime", + "startTime", + "taskName", + "taskDescription", + "assignee", + "owner", + "dueDate", + "followUpDate", + "deleteReason", + "taskDefinitionKey", + "priority", + "caseDefinitionId", + "caseInstanceId", + "caseExecutionId", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricTaskInstanceReportResultDto": { + "type": "object", + "properties": { + "taskName": { + "type": "string", + "nullable": true, + "description": "The name of the task. It is only available when the `groupBy` parameter is set to `taskName`.\nElse the value is `null`.\n\n**Note:** This property is only set for a historic task report object.\nIn these cases, the value of the `reportType` query parameter is `count`." + }, + "count": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The number of tasks which have the given definition.\n\n**Note:** This property is only set for a historic task report object.\nIn these cases, the value of the `reportType` query parameter is `count`." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition.\n\n**Note:** This property is only set for a historic task report object.\nIn these cases, the value of the `reportType` query parameter is `count`." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition.\n\n**Note:** This property is only set for a historic task report object.\nIn these cases, the value of the `reportType` query parameter is `count`." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "The name of the process definition.\n\n**Note:** This property is only set for a historic task report object.\nIn these cases, the value of the `reportType` query parameter is `count`." + }, + "period": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Specifies a span of time within a year.\n**Note:** The period must be interpreted in conjunction with the returned `periodUnit`.\n\n**Note:** This property is only set for a duration report object.\nIn these cases, the value of the `reportType` query parameter is `duration`." + }, + "periodUnit": { + "type": "string", + "nullable": true, + "enum": [ + "MONTH", + "QUARTER" + ], + "description": "The unit of the given period. Possible values are `MONTH` and `QUARTER`.\n\n**Note:** This property is only set for a duration report object.\nIn these cases, the value of the `reportType` query parameter is `duration`." + }, + "minimum": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The smallest duration in milliseconds of all completed process instances which\nwere started in the given period.\n\n**Note:** This property is only set for a duration report object.\nIn these cases, the value of the `reportType` query parameter is `duration`." + }, + "maximum": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The greatest duration in milliseconds of all completed process instances which were\nstarted in the given period.\n\n**Note:** This property is only set for a duration report object.\nIn these cases, the value of the `reportType` query parameter is `duration`." + }, + "average": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The average duration in milliseconds of all completed process instances which were\nstarted in the given period.\n\n**Note:** This property is only set for a duration report object.\nIn these cases, the value of the `reportType` query parameter is `duration`." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant." + } + } + }, + "HistoricVariableInstanceDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the variable instance." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the variable instance." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition the variable instance belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the variable instance belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id the variable instance belongs to." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution id the variable instance belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance in which the variable is valid." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the case definition the variable instance belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the case definition the variable instance belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The case instance id the variable instance belongs to." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "The case execution id the variable instance belongs to." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task the variable instance belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant that this variable instance belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message in case a Java Serialized Object could not be de-serialized." + }, + "state": { + "type": "string", + "nullable": true, + "description": "The current state of the variable. Can be \u0027CREATED\u0027 or \u0027DELETED\u0027." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the variable was inserted. [Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the variable should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this variable." + } + } + }, + { + "$ref": "#/components/schemas/VariableValueDto" + } + ] + }, + "HistoricVariableInstanceQueryDto": { + "type": "object", + "description": "A Historic Variable Instance instance query which defines a list of Historic Variable Instance instances", + "properties": { + "variableName": { + "type": "string", + "nullable": true, + "description": "Filter by variable name." + }, + "variableNameLike": { + "type": "string", + "nullable": true, + "description": "Restrict to variables with a name like the parameter." + }, + "variableValue": { + "type": "object", + "description": "Filter by variable value. May be `String`, `Number` or `Boolean`." + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match the variable name provided in `variableName` and `variableNameLike` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match the variable value provided in `variableValue` case-insensitively. If set to `true`\n**variableValue** and **variablevalue** are treated as equal." + }, + "variableTypeIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type\n\u0027serializable\u0027." + }, + "includeDeleted": { + "type": "boolean", + "nullable": true, + "description": "Include variables that has already been deleted during the execution." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the process instance the variable belongs to." + }, + "processInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed process instance ids." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the process definition the variable belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by a key of the process definition the variable belongs to." + }, + "executionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and execution ids." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the case instance the variable belongs to." + }, + "caseExecutionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and case execution ids." + }, + "caseActivityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and case activity ids." + }, + "taskIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and task ids." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and activity instance ids." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic variable instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + "variableNameIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed variable names." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Sorting has no effect for `count` endpoints", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "instanceId", + "variableName", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoryCleanupConfigurationDto": { + "type": "object", + "properties": { + "batchWindowStartTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Start time of the current or next batch window. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "batchWindowEndTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "End time of the current or next batch window. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "enabled": { + "type": "boolean", + "nullable": true, + "description": "Indicates whether the engine node participates in history cleanup or\nnot. The default is `true`. Participation can be disabled via\n[Process Engine Configuration](https://docs.camunda.org/manual/7.22/reference/deployment-descriptors/tags/process-engine/#history-cleanup-enabled).\n\nFor more details, see\n[Cleanup Execution Participation per Node](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#cleanup-execution-participation-per-node)." + } + } + }, + "HistoryTimeToLiveDto": { + "type": "object", + "properties": { + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0, + "description": "New value for historyTimeToLive field of the definition.\nCan be `null` if `enforceHistoryTimeToLive` is configured to `false`.\nCannot be negative." + } + } + }, + "IdentityLinkDto": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user participating in this link. Either `userId` or `groupId` is set." + }, + "groupId": { + "type": "string", + "nullable": true, + "description": "The id of the group participating in this link. Either `groupId` or `userId` is set." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of the identity link. The value of the this property can be user-defined. The Process Engine\nprovides three pre-defined Identity Link `type`s:\n\n* `candidate`\n* `assignee` - reserved for the task assignee\n* `owner` - reserved for the task owner\n\n**Note**: When adding or removing an Identity Link, the `type` property must be defined." + } + } + }, + "IdentityServiceGroupDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the group." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the group." + } + } + }, + "IdentityServiceGroupInfoDto": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/IdentityServiceGroupDto" + }, + "description": "An array of group objects." + }, + "groupUsers": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/IdentityServiceUserDto" + }, + "description": "An array that contains all users that are member in one of the groups." + } + } + }, + "IdentityServiceUserDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the user." + }, + "firstName": { + "type": "string", + "nullable": true, + "description": "The firstname of the user." + }, + "lastName": { + "type": "string", + "nullable": true, + "description": "The lastname of the user." + }, + "displayName": { + "type": "string", + "nullable": true, + "description": "The displayName is generated from the id or firstName and lastName if available." + } + } + }, + "IncidentDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the incident." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition this incident is associated with." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance this incident is associated with." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution this incident is associated with." + }, + "incidentTimestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time this incident happened. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "incidentType": { + "type": "string", + "nullable": true, + "description": "The type of incident, for example: `failedJobs` will be returned in case of an incident which identified\na failed job during the execution of a process instance. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity this incident is associated with." + }, + "failedActivityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the last exception occurred." + }, + "causeIncidentId": { + "type": "string", + "nullable": true, + "description": "The id of the associated cause incident which has been triggered." + }, + "rootCauseIncidentId": { + "type": "string", + "nullable": true, + "description": "The id of the associated root cause incident which has been triggered." + }, + "configuration": { + "type": "string", + "nullable": true, + "description": "The payload of this incident." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant this incident is associated with." + }, + "incidentMessage": { + "type": "string", + "nullable": true, + "description": "The message of this incident." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id the incident is associated with." + }, + "annotation": { + "type": "string", + "nullable": true, + "description": "The annotation set to the incident." + } + } + }, + "IncidentStatisticsResultDto": { + "type": "object", + "properties": { + "incidentType": { + "type": "string", + "nullable": true, + "description": "The type of the incident the number of incidents is aggregated for.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + "incidentCount": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The total number of incidents for the corresponding incident type." + } + } + }, + "JobConditionQueryParameterDto": { + "type": "object", + "properties": { + "operator": { + "type": "string", + "nullable": true, + "enum": [ + "gt", + "lt" + ], + "description": "Comparison operator to be used." + }, + "value": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Date value to compare with." + } + } + }, + "JobDefinitionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the job definition." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition this job definition is associated with." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition this job definition is associated with." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity this job definition is associated with." + }, + "jobType": { + "type": "string", + "nullable": true, + "description": "The type of the job which is running for this job definition. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job types." + }, + "jobConfiguration": { + "type": "string", + "nullable": true, + "description": "The configuration of a job definition provides details about the jobs which will be\ncreated. For example: for timer jobs it is the timer configuration." + }, + "overridingJobPriority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The execution priority defined for jobs that are created based on this definition.\nMay be `null` when the priority has not been overridden on the job\ndefinition level." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Indicates whether this job definition is suspended or not." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant this job definition is associated with." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The id of the deployment this job definition is related to. In a deployment-aware\nsetup, this leads to all jobs of the same definition being executed\non the same node." + } + } + }, + "JobDefinitionPriorityDto": { + "type": "object", + "properties": { + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The new execution priority number for jobs of the given definition. The\ndefinition\u0027s priority can be reset by using the value `null`. In\nthat case, the job definition\u0027s priority no longer applies but a new\njob\u0027s priority is determined as specified in the process model." + }, + "includeJobs": { + "type": "boolean", + "nullable": true, + "description": "A boolean value indicating whether existing jobs of the given definition should\nreceive the priority as well. Default value is `false`. Can only be\n`true` when the __priority__ parameter is not `null`." + } + } + }, + "JobDefinitionQueryDto": { + "type": "object", + "description": "A Job definition query which defines a list of Job definitions", + "properties": { + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by job definition id." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed activity ids." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Only include job definitions which exist for the given process definition id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Only include job definitions which exist for the given process definition key." + }, + "jobType": { + "type": "string", + "nullable": true, + "description": "Only include job definitions which exist for the given job type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job types." + }, + "jobConfiguration": { + "type": "string", + "nullable": true, + "description": "Only include job definitions which exist for the given job configuration. For example: for\ntimer jobs it is the timer configuration." + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Only include active job definitions. Value may only be `true`, as `false` is the default\nbehavior." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Only include suspended job definitions. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "withOverridingJobPriority": { + "type": "boolean", + "nullable": true, + "description": "Only include job definitions that have an overriding job priority defined. The only\neffective value is `true`. If set to `false`, this filter is not applied." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed tenant\nids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include job definitions which belong to no tenant. Value may only be `true`, as\n`false` is the default behavior." + }, + "includeJobDefinitionsWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Include job definitions which belong to no tenant. Can be used in combination with\n`tenantIdIn`. Value may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Sorting has no effect for `count` endpoints.", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "jobDefinitionId", + "activityId", + "processDefinitionId", + "processDefinitionKey", + "jobType", + "jobConfiguration", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "JobDefinitionSuspensionStateDto": { + "allOf": [ + { + "type": "object", + "properties": { + "includeJobs": { + "type": "boolean", + "nullable": true, + "description": "A `Boolean` value which indicates whether to activate or suspend also all jobs of\nthe referenced job definitions. When the value is set to `true`, all jobs\nof the provided job definitions will be activated or suspended and\nwhen the value is set to `false`, the suspension state of all jobs\nof the provided job definitions will not be updated." + }, + "executionDate": { + "type": "string", + "nullable": true, + "description": "The date on which the referenced job definitions will be activated or suspended. If null,\nthe suspension state of the given job definitions is updated\nimmediately. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + } + } + }, + { + "$ref": "#/components/schemas/SuspensionStateDto" + } + ] + }, + "JobDefinitionsSuspensionStateDto": { + "allOf": [ + { + "type": "object", + "description": "Defines by which selection criterion to activate or suspend job definitions.\nThe selection criteria are mutually exclusive and can only be one of:\n* `processDefinitionId`\n* `processDefinitionKey`", + "properties": { + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The process definition id of the job definitions to activate or suspend." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The process definition key of the job definitions to activate or suspend." + }, + "processDefinitionTenantId": { + "type": "string", + "nullable": true, + "description": "Only activate or suspend job definitions of a process definition which belongs to a\ntenant with the given id.\n\nNote that this parameter will only be considered \nin combination with `processDefinitionKey`." + }, + "processDefinitionWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only activate or suspend job definitions of a process definition which belongs to\nno tenant. Value may only be `true`, as `false` is the default\nbehavior.\n\nNote that this parameter will only be considered \nin combination with `processDefinitionKey`." + } + } + }, + { + "$ref": "#/components/schemas/JobDefinitionSuspensionStateDto" + } + ] + }, + "JobDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the job." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the associated job definition." + }, + "dueDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date on which this job is supposed to be processed." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance which execution created the job." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The specific execution id on which the job was created." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition which this job belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition which this job belongs to." + }, + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries this job has left." + }, + "exceptionMessage": { + "type": "string", + "nullable": true, + "description": "The message of the exception that occurred, the last time the job was executed. Is\nnull when no exception occurred." + }, + "failedActivityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the last exception occurred, the last time the job\nwas executed. Is null when no exception occurred." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether the job is suspended or not." + }, + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The job\u0027s priority for execution." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant which this job belongs to." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date on which this job has been created." + }, + "batchId": { + "type": "string", + "nullable": true, + "description": "The ID of the batch associated with this job. `null` if no batch is associated with this job. The\nfollowing jobs are associated with batches:\n* Seed Jobs\n* Monitor Jobs\n* Batch Execution Jobs" + } + } + }, + "JobDuedateDto": { + "type": "object", + "properties": { + "duedate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date to set when the job has the next execution." + }, + "cascade": { + "type": "boolean", + "nullable": true, + "description": "A boolean value to indicate if modifications to the due date should cascade to\nsubsequent jobs. (e.g. Modify the due date of a timer by +15\nminutes. This flag indicates if a +15 minutes should be applied to all\nsubsequent timers.) This flag only affects timer jobs and only works if due date\nis not null. Default: `false`" + } + } + }, + "JobQueryDto": { + "type": "object", + "description": "A Job instance query which defines a list of Job instances", + "properties": { + "jobId": { + "type": "string", + "nullable": true, + "description": "Filter by job id." + }, + "jobIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of job ids." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "Only select jobs which exist for the given job definition." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Only select jobs which exist for the given process instance." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only select jobs which exist for the given list of process instance ids." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Only select jobs which exist for the given execution." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the process definition the jobs run on." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the process definition the jobs run on." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Only select jobs which exist for an activity with the given id." + }, + "withRetriesLeft": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs which have retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "executable": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs which are executable, i.e., retries \u003e 0 and due date is `null` or due\ndate is in the past. Value may only be `true`, as `false` is the default\nbehavior." + }, + "timers": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs that are timers. Cannot be used together with `messages`. Value may only\nbe `true`, as `false` is the default behavior." + }, + "messages": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs that are messages. Cannot be used together with `timers`. Value may only\nbe `true`, as `false` is the default behavior." + }, + "dueDates": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/JobConditionQueryParameterDto" + }, + "description": "Only select jobs where the due date is lower or higher than the given date.\n" + }, + "createTimes": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/JobConditionQueryParameterDto" + }, + "description": "Only select jobs created before or after the given date.\n" + }, + "withException": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs that failed due to an exception. Value may only be `true`, as `false` is\nthe default behavior." + }, + "exceptionMessage": { + "type": "string", + "nullable": true, + "description": "Only select jobs that failed due to an exception with the given message." + }, + "failedActivityId": { + "type": "string", + "nullable": true, + "description": "Only select jobs that failed due to an exception at an activity with the given id." + }, + "noRetriesLeft": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs which have no retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Only include active jobs. Value may only be `true`, as `false` is the default behavior." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Only include suspended jobs. Value may only be `true`, as `false` is the default behavior." + }, + "priorityLowerThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include jobs with a priority lower than or equal to the given value. Value must be a\nvalid `long` value." + }, + "priorityHigherThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include jobs with a priority higher than or equal to the given value. Value must be a\nvalid `long` value." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include jobs which belong to one of the passed tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include jobs which belong to no tenant. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "includeJobsWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Include jobs which belong to no tenant. Can be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Does not have an effect for the `count` endpoint.", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "jobId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "jobPriority", + "jobRetries", + "jobDueDate", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "JobRetriesDto": { + "allOf": [ + { + "type": "object", + "properties": { + "dueDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The due date to set for the job. A due date indicates when this job is ready for execution.\nJobs with due dates in the past will be scheduled for execution." + } + } + }, + { + "$ref": "#/components/schemas/RetriesDto" + } + ] + }, + "JobSuspensionStateDto": { + "allOf": [ + { + "type": "object", + "description": "Defines by which selection criterion to activate or suspend jobs.\nThis selection criterion are mutually exclusive and can only be on of:\n* `jobDefinitionId`\n* `processDefinitionId`\n* `processInstanceId`\n* `processDefinitionKey`", + "properties": { + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id of the jobs to activate or suspend." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The process definition id of the jobs to activate or suspend." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the jobs to activate or suspend." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The process definition key of the jobs to activate or suspend." + }, + "processDefinitionTenantId": { + "type": "string", + "nullable": true, + "description": "Only activate or suspend jobs of a process definition which belongs to a tenant\nwith the given id. Works only when selecting with `processDefinitionKey`." + }, + "processDefinitionWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only activate or suspend jobs of a process definition which belongs to no tenant.\nValue may only be `true`, as `false` is the default behavior. Works only when selecting with `processDefinitionKey`." + } + } + }, + { + "$ref": "#/components/schemas/SuspensionStateDto" + } + ] + }, + "LinkableDto": { + "type": "object", + "properties": { + "links": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/AtomLink" + }, + "description": "The links associated to this resource, with `method`, `href` and `rel`." + } + } + }, + "LockExternalTaskDto": { + "allOf": [ + { + "type": "object", + "properties": { + "lockDuration": { + "type": "integer", + "format": "int64", + "description": "The duration to lock the external task for in milliseconds.\n**Note:** Attempting to lock an already locked external task with the same `workerId`\nwill succeed and a new lock duration will be set, starting from the current moment." + } + } + }, + { + "$ref": "#/components/schemas/HandleExternalTaskDto" + } + ] + }, + "LockedExternalTaskDto": { + "title": "LockedExternalTaskDto", + "type": "object", + "properties": { + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this external task belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance that the external task belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "The full error message submitted with the latest reported failure executing this task;`null` if no failure\nwas reported previously or if no error message was submitted" + }, + "errorDetails": { + "type": "string", + "nullable": true, + "description": "The error details submitted with the latest reported failure executing this task.`null` if no failure was\nreported previously or if no error details was submitted" + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution that the external task belongs to." + }, + "id": { + "type": "string", + "nullable": true, + "description": "The id of the external task." + }, + "lockExpirationTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date that the task\u0027s most recent lock expires or has expired." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the external task is defined in." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition the external task is defined in." + }, + "processDefinitionVersionTag": { + "type": "string", + "nullable": true, + "description": "The version tag of the process definition the external task is defined in." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the external task belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant the external task belongs to." + }, + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries the task currently has left." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Whether the process instance the external task belongs to is suspended." + }, + "workerId": { + "type": "string", + "nullable": true, + "description": "The id of the worker that posesses or posessed the most recent lock." + }, + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The priority of the external task." + }, + "topicName": { + "type": "string", + "nullable": true, + "description": "The topic name of the external task." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key of the process instance the external task belongs to." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing a property for each of the requested variables. The key is the variable name,\nthe value is a JSON object of serialized variable values with the following properties:" + } + } + }, + "MessageCorrelationResultWithVariableDto": { + "type": "object", + "description": "The `processInstance` property only has a value if the resultType is set to `ProcessDefinition`.\nThe processInstance with the properties as described in the\n[get single instance](https://docs.camunda.org/manual/7.22/reference/rest/process-instance/get/) method.\n\nThe `execution` property only has a value if the resultType is set to `Execution`.\nThe execution with the properties as described in the\n[get single execution](https://docs.camunda.org/manual/7.22/reference/rest/execution/get/) method.", + "properties": { + "resultType": { + "type": "string", + "nullable": true, + "enum": [ + "Execution", + "ProcessDefinition" + ], + "description": "Indicates if the message was correlated to a message start event or an \nintermediate message catching event. In the first case, the resultType is \n`ProcessDefinition` and otherwise `Execution`." + }, + "processInstance": { + "$ref": "#/components/schemas/ProcessInstanceDto" + }, + "execution": { + "$ref": "#/components/schemas/ExecutionDto" + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "This property is returned if the `variablesInResultEnabled` is set to `true`.\nContains a list of the process variables. " + } + } + }, + "MetricsIntervalResultDto": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The interval timestamp." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the metric." + }, + "reporter": { + "type": "string", + "nullable": true, + "description": "The reporter of the metric. `null` if the metrics are aggregated by reporter." + }, + "value": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The value of the metric aggregated by the interval." + } + } + }, + "MetricsResultDto": { + "type": "object", + "properties": { + "result": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The current sum (count) for the selected metric." + } + } + }, + "MigrationExecutionDto": { + "type": "object", + "properties": { + "migrationPlan": { + "$ref": "#/components/schemas/MigrationPlanDto" + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids to migrate." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "A boolean value to control whether execution listeners should be invoked during\nmigration." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "A boolean value to control whether input/output mappings should be executed during\nmigration." + } + } + }, + "MigrationInstructionDto": { + "type": "object", + "properties": { + "sourceActivityIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The activity ids from the source process definition being mapped." + }, + "targetActivityIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The activity ids from the target process definition being mapped." + }, + "updateEventTrigger": { + "type": "boolean", + "nullable": true, + "description": "Configuration flag whether event triggers defined are going to be updated during migration." + } + } + }, + "MigrationInstructionValidationReportDto": { + "type": "object", + "properties": { + "instruction": { + "$ref": "#/components/schemas/MigrationInstructionDto" + }, + "failures": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of instruction validation report messages." + } + } + }, + "MigrationPlanDto": { + "type": "object", + "properties": { + "sourceProcessDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the source process definition for the migration." + }, + "targetProcessDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the target process definition for the migration." + }, + "instructions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/MigrationInstructionDto" + }, + "description": "A list of migration instructions which map equal activities. Each\nmigration instruction is a JSON object with the following properties:" + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of variables which will be set into the process instances\u0027 scope.\nEach key is a variable name and each value a JSON variable value object." + } + } + }, + "MigrationPlanGenerationDto": { + "type": "object", + "properties": { + "sourceProcessDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the source process definition for the migration." + }, + "targetProcessDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the target process definition for the migration." + }, + "updateEventTriggers": { + "type": "boolean", + "nullable": true, + "description": "A boolean flag indicating whether instructions between events should be configured\nto update the event triggers." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of variables which will be set into the process instances\u0027 scope.\nEach key is a variable name and each value a JSON variable value object." + } + } + }, + "MigrationPlanReportDto": { + "type": "object", + "properties": { + "instructionReports": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/MigrationInstructionValidationReportDto" + }, + "description": "The list of instruction validation reports. If no validation\nerrors are detected it is an empty list." + }, + "variableReports": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/MigrationVariableValidationReportDto" + }, + "description": "A map of variable reports.\nEach key is a variable name and each value a JSON object consisting of the variable\u0027s type, value,\nvalue info object and a list of failures." + } + } + }, + "MigrationVariableValidationReportDto": { + "allOf": [ + { + "type": "object", + "properties": { + "failures": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of variable validation report messages." + } + } + }, + { + "$ref": "#/components/schemas/VariableValueDto" + } + ] + }, + "MissingAuthorizationDto": { + "type": "object", + "properties": { + "permissionName": { + "type": "string", + "nullable": true, + "description": "The permission name that the user is missing." + }, + "resourceName": { + "type": "string", + "nullable": true, + "description": "The name of the resource that the user is missing permission for." + }, + "resourceId": { + "type": "string", + "nullable": true, + "description": "The id of the resource that the user is missing permission for." + } + } + }, + "ModificationDto": { + "type": "object", + "properties": { + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition for the modification" + }, + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "Skip execution listener invocation for activities that are started or ended as part\nof this request." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "Skip execution of [input/output variable mappings](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#input-output-variable-mapping) for\nactivities that are started or ended as part of this request." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids to modify." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "instructions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/MultipleProcessInstanceModificationInstructionDto" + }, + "description": "An array of modification instructions. The instructions are executed in the order they are in. " + }, + "annotation": { + "type": "string", + "nullable": true, + "description": "An arbitrary text annotation set by a user for auditing reasons." + } + } + }, + "MultiFormAttachmentDto": { + "type": "object", + "properties": { + "attachment-name": { + "type": "string", + "nullable": true, + "description": "The name of the attachment." + }, + "attachment-description": { + "type": "string", + "nullable": true, + "description": "The description of the attachment." + }, + "attachment-type": { + "type": "string", + "nullable": true, + "description": "The type of the attachment." + }, + "url": { + "type": "string", + "nullable": true, + "description": "The url to the remote content of the attachment." + }, + "content": { + "type": "string", + "format": "binary", + "nullable": true, + "description": "The content of the attachment." + } + } + }, + "MultiFormDeploymentDto": { + "type": "object", + "properties": { + "tenant-id": { + "type": "string", + "nullable": true, + "description": "The tenant id for the deployment to be created." + }, + "deployment-source": { + "type": "string", + "nullable": true, + "description": "The source for the deployment to be created." + }, + "deploy-changed-only": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A flag indicating whether the process engine should perform duplicate checking on a per-resource basis.\nIf set to true, only those resources that have actually changed are deployed.\nChecks are made against resources included previous deployments of the same name and source and only against the latest versions of those resources.\nIf set to true, the option enable-duplicate-filtering is overridden and set to true." + }, + "enable-duplicate-filtering": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A flag indicating whether the process engine should perform duplicate checking for the deployment or not.\nThis allows you to check if a deployment with the same name and the same resouces already exists and\nif true, not create a new deployment but instead return the existing deployment. The default value is false." + }, + "deployment-name": { + "type": "string", + "nullable": true, + "description": "The name for the deployment to be created." + }, + "deployment-activation-time": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Sets the date on which the process definitions contained in this deployment will be activated. This means that all process\ndefinitions will be deployed as usual, but they will be suspended from the start until the given activation date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "data": { + "type": "string", + "format": "binary", + "nullable": true, + "description": "The binary data to create the deployment resource.\nIt is possible to have more than one form part with different form part names for the binary data to create a deployment." + } + } + }, + "MultiFormVariableBinaryDto": { + "type": "object", + "properties": { + "data": { + "type": "string", + "format": "binary", + "nullable": true, + "description": "The binary data to be set.\nFor File variables, this multipart can contain the filename, binary value and MIME type of the file variable to be set\nOnly the filename is mandatory." + }, + "valueType": { + "type": "string", + "nullable": true, + "enum": [ + "Bytes", + "File" + ], + "description": "The name of the variable type. Either Bytes for a byte array variable or File for a file variable." + } + } + }, + "MultipleProcessInstanceModificationInstructionDto": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "cancel", + "startBeforeActivity", + "startAfterActivity", + "startTransition" + ], + "description": "**Mandatory**. One of the following values: `cancel`, `startBeforeActivity`, `startAfterActivity`, `startTransition`.\n\n* A cancel instruction requests cancellation of a single activity instance or all instances of one activity.\n* A startBeforeActivity instruction requests to enter a given activity.\n* A startAfterActivity instruction requests to execute the single outgoing sequence flow of a given activity.\n* A startTransition instruction requests to execute a specific sequence flow." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." + }, + "transitionId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." + }, + "cancelCurrentActiveActivityInstances": { + "type": "boolean", + "nullable": true, + "description": "Can be used with instructions of type cancel. Prevents the deletion of new created activity instances." + } + } + }, + "ParseExceptionDto": { + "allOf": [ + { + "type": "object", + "properties": { + "details": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/ResourceReportDto" + }, + "description": "A JSON Object containing list of errors and warnings occurred during deployment." + } + } + }, + { + "$ref": "#/components/schemas/ExceptionDto" + } + ] + }, + "PasswordPolicyDto": { + "type": "object", + "properties": { + "rules": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/PasswordPolicyRuleDto" + }, + "description": "An array of password policy rules. Each element of the array is representing one rule of the policy." + } + } + }, + "PasswordPolicyRequestDto": { + "type": "object", + "properties": { + "password": { + "type": "string", + "nullable": true, + "description": "The candidate password to be check against the password policy." + }, + "profile": { + "$ref": "#/components/schemas/UserProfileDto" + } + } + }, + "PasswordPolicyRuleDto": { + "type": "object", + "description": "Describes a rule of a password policy.", + "properties": { + "placeholder": { + "type": "string", + "nullable": true, + "description": "A placeholder string that contains the name of a password policy rule." + }, + "parameter": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "A map that describes the characteristics of a password policy rule, such as the minimum number of digits." + } + } + }, + "PatchVariablesDto": { + "type": "object", + "properties": { + "modifications": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs." + }, + "deletions": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "An array of String keys of variables to be deleted." + } + } + }, + "PriorityDto": { + "type": "object", + "properties": { + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The priority of the resource." + } + } + }, + "ProblemDto": { + "type": "object", + "properties": { + "message": { + "type": "string", + "nullable": true, + "description": "The message of the problem." + }, + "line": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The line where the problem occurred." + }, + "column": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The column where the problem occurred." + }, + "mainElementId": { + "type": "string", + "nullable": true, + "description": "The main element id where the problem occurred." + }, + "elementIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of element id affected by the problem." + } + } + }, + "ProcessDefinitionDiagramDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the process definition." + }, + "bpmn20Xml": { + "type": "string", + "nullable": true, + "description": "An escaped XML string containing the XML that this definition was deployed with.\nCarriage returns, line feeds and quotation marks are escaped." + } + } + }, + "ProcessDefinitionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the process definition" + }, + "key": { + "type": "string", + "nullable": true, + "description": "The key of the process definition, i.e., the id of the BPMN 2.0 XML process definition." + }, + "category": { + "type": "string", + "nullable": true, + "description": "The category of the process definition." + }, + "description": { + "type": "string", + "nullable": true, + "description": "The description of the process definition." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the process definition." + }, + "version": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the process definition that the engine assigned to it." + }, + "resource": { + "type": "string", + "nullable": true, + "description": "The file name of the process definition." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The deployment id of the process definition." + }, + "diagram": { + "type": "string", + "nullable": true, + "description": "The file name of the process definition diagram, if it exists." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether the definition is suspended or not." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the process definition." + }, + "versionTag": { + "type": "string", + "nullable": true, + "description": "The version tag of the process definition." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0, + "description": "History time to live value of the process definition.\nIs used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)." + }, + "startableInTasklist": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether the process definition is startable in Tasklist or not." + } + } + }, + "ProcessDefinitionStatisticsResultDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the results are aggregated for." + }, + "instances": { + "type": "integer", + "format": "int32", + "description": "The total number of running process instances of this process definition." + }, + "failedJobs": { + "type": "integer", + "format": "int32", + "description": "The total number of failed jobs for the running instances.\n**Note**: Will be `0` (not `null`), if failed jobs were excluded." + }, + "incidents": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/IncidentStatisticsResultDto" + }, + "description": "Each item in the resulting array is an object which contains `incidentType` and `incidentCount`.\n**Note**: Will be an empty array, if `incidents` or `incidentsForType` were excluded.\nFurthermore, the array will be also empty if no incidents were found." + }, + "@class": { + "type": "string", + "nullable": true, + "description": "The fully qualified class name of the data transfer object class.\nThe class name might change in future releases." + }, + "definition": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + } + } + }, + "ProcessDefinitionSuspensionStateDto": { + "type": "object", + "properties": { + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A `Boolean` value which indicates whether to activate or suspend all process definitions with the given key.\nWhen the value is set to `true`, all process definitions with the given key will be suspended and\nwhen the value is set to `false`, all process definitions with the given key will be activated." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definitions to activate or suspend." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definitions to activate or suspend." + }, + "includeProcessInstances": { + "type": "boolean", + "nullable": true, + "description": "A `Boolean` value which indicates whether to activate or suspend also all process instances of \nthe process definitions with the given key.\nWhen the value is set to `true`, all process instances of the process definitions with the given key\nwill be activated or suspended and when the value is set to `false`, the suspension state of \nall process instances of the process definitions with the given key will not be updated." + }, + "executionDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date on which all process definitions with the given key will be activated or suspended.\nIf `null`, the suspension state of all process definitions with the given key is updated immediately.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + } + } + }, + "ProcessEngineDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "The name of the process engine." + } + } + }, + "ProcessInstanceDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the process instance." + }, + "definitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this process instance belongs to." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key of the process instance." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance associated with the process instance." + }, + "ended": { + "type": "boolean", + "nullable": true, + "deprecated": true, + "description": "A flag indicating whether the process instance has ended or not. Deprecated: will always be false!" + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether the process instance is suspended or not." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the process instance." + } + } + }, + { + "$ref": "#/components/schemas/LinkableDto" + } + ] + }, + "ProcessInstanceModificationDto": { + "type": "object", + "properties": { + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "Skip execution listener invocation for activities that are started or ended as part of this request." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "Skip execution of [input/output variable mappings](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#input-output-variable-mapping)\nfor activities that are started or ended as part of this request." + }, + "instructions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProcessInstanceModificationInstructionDto" + }, + "description": "JSON array of modification instructions. The instructions are executed in the order they are in." + }, + "annotation": { + "type": "string", + "nullable": true, + "description": "An arbitrary text annotation set by a user for auditing reasons." + } + } + }, + "ProcessInstanceModificationInstructionDto": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "cancel", + "startBeforeActivity", + "startAfterActivity", + "startTransition" + ], + "description": "**Mandatory**. One of the following values: `cancel`, `startBeforeActivity`, `startAfterActivity`, `startTransition`.\n\n* A cancel instruction requests cancellation of a single activity instance or all instances of one activity.\n* A startBeforeActivity instruction requests to enter a given activity.\n* A startAfterActivity instruction requests to execute the single outgoing sequence flow of a given activity.\n* A startTransition instruction requests to execute a specific sequence flow." + }, + "variables": { + "$ref": "#/components/schemas/TriggerVariableValueDto" + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." + }, + "transitionId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of type `cancel`. Specifies the activity instance to cancel.\nValid values are the activity instance IDs supplied by the [Get Activity Instance request](https://docs.camunda.org/manual/7.22/reference/rest/process-instance/get-activity-instances/)." + }, + "transitionInstanceId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of type `cancel`. Specifies the transition instance to cancel.\nValid values are the transition instance IDs supplied by the [Get Activity Instance request](https://docs.camunda.org/manual/7.22/reference/rest/process-instance/get-activity-instances/)." + }, + "ancestorActivityInstanceId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of type `startBeforeActivity`, `startAfterActivity`, and `startTransition`.\nValid values are the activity instance IDs supplied by the Get Activity Instance request.\nIf there are multiple parent activity instances of the targeted activity,\nthis specifies the ancestor scope in which hierarchy the activity/transition is to be instantiated.\n\nExample: When there are two instances of a subprocess and an activity contained in the subprocess is to be started,\nthis parameter allows to specifiy under which subprocess instance the activity should be started." + }, + "cancelCurrentActiveActivityInstances": { + "type": "boolean", + "nullable": true, + "description": "Can be used with instructions of type cancel. Prevents the deletion of new created activity instances." + } + } + }, + "ProcessInstanceQueryDto": { + "type": "object", + "description": "A process instance query which defines a group of process instances", + "properties": { + "deploymentId": { + "type": "string", + "nullable": true, + "description": "Filter by the deployment the id belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the process definition the instances run on." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the process definition the instances run on." + }, + "processDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of process definition keys.\nA process instance must have one of the given process definition keys. Must be a JSON array of Strings." + }, + "processDefinitionKeyNotIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Exclude instances by a list of process definition keys.\nA process instance must not have one of the given process definition keys. Must be a JSON array of Strings." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key." + }, + "businessKeyLike": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by case instance id." + }, + "superProcessInstance": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that are sub process instances of the given process instance.\nTakes a process instance id." + }, + "subProcessInstance": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that have the given process instance as a sub process instance.\nTakes a process instance id." + }, + "superCaseInstance": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that are sub process instances of the given case instance.\nTakes a case instance id." + }, + "subCaseInstance": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that have the given case instance as a sub case instance.\nTakes a case instance id." + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Only include active process instances. Value may only be true, as false is the default behavior." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Only include suspended process instances. Value may only be true, as false is the default behavior." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of process instance ids. Must be a JSON array of Strings." + }, + "withIncident": { + "type": "boolean", + "nullable": true, + "description": "Filter by presence of incidents. Selects only process instances that have an incident." + }, + "incidentId": { + "type": "string", + "nullable": true, + "description": "Filter by the incident id." + }, + "incidentType": { + "type": "string", + "nullable": true, + "description": "Filter by the incident type. See the User Guide for a list of incident types." + }, + "incidentMessage": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message. Exact match." + }, + "incidentMessageLike": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message that the parameter is a substring of." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. A process instance must have one of the given tenant ids.\nMust be a JSON array of Strings." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include process instances which belong to no tenant.\nValue may only be true, as false is the default behavior." + }, + "processDefinitionWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include process instances which process definition has no tenant id." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of activity ids.\nA process instance must currently wait in a leaf activity with one of the given activity ids." + }, + "rootProcessInstances": { + "type": "boolean", + "nullable": true, + "description": "Restrict the query to all process instances that are top level process instances." + }, + "leafProcessInstances": { + "type": "boolean", + "nullable": true, + "description": "Restrict the query to all process instances that are leaf instances. (i.e. don\u0027t have any sub instances)" + }, + "variables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "A JSON array to only include process instances that have variables with certain values.\nThe array consists of objects with the three properties `name`, `operator` and `value`.\n`name` (String) is the variable name,\n`operator` (String) is the comparison operator to be used and `value` the variable value.\nThe `value` may be String, Number or Boolean.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`." + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable names in this query case-insensitively.\nIf set to true variableName and variablename are treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable values in this query case-insensitively.\nIf set to true variableValue and variablevalue are treated as equal." + }, + "orQueries": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "description": "A JSON array of nested process instance queries with OR semantics.\nA process instance matches a nested query if it fulfills at least one of the query\u0027s predicates.\nWith multiple nested queries, a process instance must fulfill at least one predicate of each query (Conjunctive Normal Form).\nAll process instance query properties can be used except for: `sorting`\nSee the [User guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-engine-api/#or-queries) for more information about OR queries." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "instanceId", + "definitionId", + "definitionKey", + "businessKey", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "ProcessInstanceSuspensionStateAsyncDto": { + "allOf": [ + { + "type": "object", + "properties": { + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids which defines a group of process instances\nwhich will be activated or suspended by the operation." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + } + } + }, + { + "$ref": "#/components/schemas/SuspensionStateDto" + } + ] + }, + "ProcessInstanceSuspensionStateDto": { + "allOf": [ + { + "type": "object", + "properties": { + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The process definition id of the process instances to activate or suspend.\n\n**Note**: This parameter can be used only with combination of `suspended`." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The process definition key of the process instances to activate or suspend.\n\n**Note**: This parameter can be used only with combination of `suspended`, `processDefinitionTenantId`, and `processDefinitionWithoutTenantId`." + }, + "processDefinitionTenantId": { + "type": "string", + "nullable": true, + "description": "Only activate or suspend process instances of a process definition which belongs to a tenant with the given id.\n\n**Note**: This parameter can be used only with combination of `suspended`, `processDefinitionKey`, and `processDefinitionWithoutTenantId`." + }, + "processDefinitionWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only activate or suspend process instances of a process definition which belongs to no tenant.\nValue may only be true, as false is the default behavior.\n\n**Note**: This parameter can be used only with combination of `suspended`, `processDefinitionKey`, and `processDefinitionTenantId`." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids which defines a group of process instances\nwhich will be activated or suspended by the operation.\n\n**Note**: This parameter can be used only with combination of `suspended`, `processInstanceQuery`, and `historicProcessInstanceQuery`." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + } + } + }, + { + "$ref": "#/components/schemas/SuspensionStateDto" + } + ] + }, + "ProcessInstanceWithVariablesDto": { + "allOf": [ + { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "The id of the process instance." + } + } + }, + { + "$ref": "#/components/schemas/ProcessInstanceDto" + } + ] + }, + "RedeploymentDto": { + "title": "RedeploymentDto", + "type": "object", + "description": "A JSON object with the following properties:", + "properties": { + "resourceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of deployment resource ids to re-deploy." + }, + "resourceNames": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of deployment resource names to re-deploy." + }, + "source": { + "type": "string", + "nullable": true, + "description": "Sets the source of the deployment." + } + } + }, + "ResourceOptionsDto": { + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "$ref": "#/components/schemas/LinkableDto" + } + ] + }, + "ResourceReportDto": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProblemDto" + }, + "description": "A list of errors occurred during parsing." + }, + "warnings": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProblemDto" + }, + "description": "A list of warnings occurred during parsing." + } + } + }, + "RestartProcessInstanceDto": { + "type": "object", + "properties": { + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids to restart." + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "Skip execution listener invocation for activities that are started as part of this request." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "Skip execution of\n[input/output variable mappings](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#input-output-variable-mapping)\nfor activities that are started as part of this request." + }, + "initialVariables": { + "type": "boolean", + "nullable": true, + "description": "Set the initial set of variables during restart. By default, the last set of variables is used." + }, + "withoutBusinessKey": { + "type": "boolean", + "nullable": true, + "description": "Do not take over the business key of the historic process instance." + }, + "instructions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/RestartProcessInstanceModificationInstructionDto" + }, + "description": "**Optional**. A JSON array of instructions that specify which activities to start the process instance at.\nIf this property is omitted, the process instance starts at its default blank start event." + } + } + }, + "RestartProcessInstanceModificationInstructionDto": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "startBeforeActivity", + "startAfterActivity", + "startTransition" + ], + "description": "**Mandatory**. One of the following values: `startBeforeActivity`, `startAfterActivity`, `startTransition`.\n\n* A `startBeforeActivity` instruction requests to enter a given activity.\n* A `startAfterActivity` instruction requests to execute the single outgoing sequence flow of a given activity.\n* A `startTransition` instruction requests to execute a specific sequence flow." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "**Can be used with instructions of types** `startBeforeActivity`\nand `startAfterActivity`. Specifies the sequence flow to start." + }, + "transitionId": { + "type": "string", + "nullable": true, + "description": "**Can be used with instructions of types** `startTransition`.\nSpecifies the sequence flow to start." + } + } + }, + "RetriesDto": { + "type": "object", + "properties": { + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries to set for the resource. Must be \u003e\u003d 0. If this is 0, an incident is created\nand the task, or job, cannot be fetched, or acquired anymore unless the retries are increased again.\nCan not be null." + } + } + }, + "SchemaLogEntryDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the schema log entry." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date and time of the schema update." + }, + "version": { + "type": "string", + "nullable": true, + "description": "The version of the schema." + } + } + }, + "SchemaLogQueryDto": { + "type": "object", + "properties": { + "version": { + "type": "string", + "nullable": true, + "description": "The version of the schema." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "A JSON array of criteria to sort the result by. Each element of the array is\n a JSON object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. ", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "timestamp" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "SetJobRetriesByProcessDto": { + "allOf": [ + { + "type": "object", + "properties": { + "processInstances": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids to fetch jobs, for which retries will be set." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + } + } + }, + { + "$ref": "#/components/schemas/SetJobRetriesDto" + } + ] + }, + "SetJobRetriesDto": { + "allOf": [ + { + "type": "object", + "description": "Defines the number of retries for a selection of jobs.\nPlease note that if both jobIds and jobQuery are provided,\nthen retries will be set on the union of these sets.", + "properties": { + "jobIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of job ids to set retries for." + }, + "jobQuery": { + "$ref": "#/components/schemas/JobQueryDto" + } + } + }, + { + "$ref": "#/components/schemas/JobRetriesDto" + } + ] + }, + "SetRemovalTimeToHistoricBatchesDto": { + "allOf": [ + { + "type": "object", + "properties": { + "historicBatchQuery": { + "type": "object", + "nullable": true, + "description": "Query for the historic batches to set the removal time for." + }, + "historicBatchIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The ids of the historic batches to set the removal time for." + } + } + }, + { + "$ref": "#/components/schemas/AbstractSetRemovalTimeDto" + } + ] + }, + "SetRemovalTimeToHistoricDecisionInstancesDto": { + "allOf": [ + { + "type": "object", + "properties": { + "hierarchical": { + "type": "boolean", + "nullable": true, + "description": "Sets the removal time to all historic decision instances in the hierarchy.\nValue may only be `true`, as `false` is the default behavior." + }, + "historicDecisionInstanceQuery": { + "$ref": "#/components/schemas/HistoricDecisionInstanceQueryDto" + }, + "historicDecisionInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The ids of the historic decision instances to set the removal time for." + } + } + }, + { + "$ref": "#/components/schemas/AbstractSetRemovalTimeDto" + } + ] + }, + "SetRemovalTimeToHistoricProcessInstancesDto": { + "allOf": [ + { + "type": "object", + "properties": { + "historicProcessInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The id of the process instance." + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "hierarchical": { + "type": "boolean", + "nullable": true, + "description": "Sets the removal time to all historic process instances in the hierarchy.\nValue may only be `true`, as `false` is the default behavior." + }, + "updateInChunks": { + "type": "boolean", + "nullable": true, + "description": "Handles removal time updates in chunks, taking into account the defined size in\n`removalTimeUpdateChunkSize` in the process engine configuration. The size of the \nchunks can also be overridden per call with the `updateChunkSize` parameter.\nEnabling this option can lead to multiple executions of the resulting jobs, preventing\nthe database transaction from timing out by limiting the number of rows to update.\nValue may only be `true`, as `false` is the default behavior." + }, + "updateChunkSize": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Defines the size of the chunks in which removal time updates are processed.\nThe value must be a positive integer between `1` and `500`. This only has an \neffect if `updateInChunks` is set to `true`. If undefined, the operation uses the \n`removalTimeUpdateChunkSize` defined in the process engine configuration." + } + } + }, + { + "$ref": "#/components/schemas/AbstractSetRemovalTimeDto" + } + ] + }, + "SetRetriesForExternalTasksDto": { + "type": "object", + "properties": { + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries to set for the external task. Must be \u003e\u003d 0. If this is 0, an incident is created\nand the task cannot be fetched anymore unless the retries are increased again. Can not be null." + }, + "externalTaskIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The ids of the external tasks to set the number of retries for." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The ids of process instances containing the tasks to set the number of retries for." + }, + "externalTaskQuery": { + "$ref": "#/components/schemas/ExternalTaskQueryDto" + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + } + } + }, + "SetVariablesAsyncDto": { + "type": "object", + "properties": { + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids that define a group of process instances\nto which the operation will set variables.\n\nPlease note that if `processInstanceIds`, `processInstanceQuery` and `historicProcessInstanceQuery`\nare defined, the resulting operation will be performed on the union of these sets." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A variables the operation will set in the root scope of the process instances." + } + } + }, + "SignalDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the signal to deliver.\n\n**Note**: This property is mandatory." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Optionally specifies a single execution which is notified by the signal.\n\n**Note**: If no execution id is defined the signal is broadcasted to all subscribed\nhandlers. " + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs. Each key is a variable name and\neach value a JSON variable value object." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "Specifies a tenant to deliver the signal. The signal can only be received on\nexecutions or process definitions which belongs to the given tenant.\n\n**Note**: Cannot be used in combination with executionId." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "If true the signal can only be received on executions or process definitions which\nbelongs to no tenant. Value may not be false as this is the default behavior.\n\n**Note**: Cannot be used in combination with `executionId`." + } + } + }, + "SortTaskQueryParametersDto": { + "type": "object", + "description": "Mandatory when `sortBy` is one of the following values: `processVariable`, `executionVariable`,\n`taskVariable`, `caseExecutionVariable` or `caseInstanceVariable`. Must be a JSON object with the properties\n`variable` and `type` where `variable` is a variable name and `type` is the name of a variable value type.", + "properties": { + "variable": { + "type": "string", + "nullable": true, + "description": "The name of the variable to sort by." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The name of the type of the variable value." + } + } + }, + "StartProcessInstanceDto": { + "type": "object", + "properties": { + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key of the process instance." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "" + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The case instance id the process instance is to be initialized with." + }, + "startInstructions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProcessInstanceModificationInstructionDto" + }, + "description": "**Optional**. A JSON array of instructions that specify which activities to start the process instance at.\nIf this property is omitted, the process instance starts at its default blank start event." + }, + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "Skip execution listener invocation for activities that are started or ended as part of this request.\n**Note**: This option is currently only respected when start instructions are submitted\nvia the `startInstructions` property." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "Skip execution of\n[input/output variable mappings](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#input-output-variable-mapping)\nfor activities that are started or ended as part of this request.\n**Note**: This option is currently only respected when start instructions are submitted\nvia the `startInstructions` property." + }, + "withVariablesInReturn": { + "type": "boolean", + "nullable": true, + "description": "Indicates if the variables, which was used by the process instance during execution, should be returned.\nDefault value: `false`" + } + } + }, + "StartProcessInstanceFormDto": { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "" + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key the process instance is to be initialized with.\nThe business key uniquely identifies the process instance in the context of the given process definition." + } + } + }, + "SuspensionStateDto": { + "type": "object", + "properties": { + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A Boolean value which indicates whether to activate or suspend a given instance \n(e.g. process instance, job, job definition, or batch). When the value is set to true, \nthe given instance will be suspended and when the value is set to false, \nthe given instance will be activated." + } + } + }, + "TaskBpmnErrorDto": { + "type": "object", + "properties": { + "errorCode": { + "type": "string", + "nullable": true, + "description": "An error code that indicates the predefined error. It is used to identify the BPMN\nerror handler." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message that describes the error." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs." + } + } + }, + "TaskCountByCandidateGroupResultDto": { + "type": "object", + "properties": { + "groupName": { + "type": "string", + "nullable": true, + "description": "The name of the candidate group. If there are tasks without a group name, the value will be `null`" + }, + "taskCount": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of tasks which have the group name as candidate group." + } + } + }, + "TaskDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The task id." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The task name." + }, + "assignee": { + "type": "string", + "nullable": true, + "description": "The assignee\u0027s id." + }, + "owner": { + "type": "string", + "nullable": true, + "description": "The owner\u0027s id." + }, + "created": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date the task was created on.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "lastUpdated": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date the task was last updated. Every action that fires a [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) will update this property.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "due": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The task\u0027s due date.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "followUp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The follow-up date for the task.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "delegationState": { + "type": "string", + "nullable": true, + "enum": [ + "PENDING", + "RESOLVED" + ], + "description": "The task\u0027s delegation state. Possible values are `PENDING` and `RESOLVED`." + }, + "description": { + "type": "string", + "nullable": true, + "description": "The task\u0027s description." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution the task belongs to." + }, + "parentTaskId": { + "type": "string", + "nullable": true, + "description": "The id the parent task, if this task is a subtask." + }, + "priority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The task\u0027s priority." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the task belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the task belongs to." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "The id of the case execution the task belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the case definition the task belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance the task belongs to." + }, + "taskDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The task\u0027s key." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Whether the task belongs to a process instance that is suspended." + }, + "formKey": { + "type": "string", + "nullable": true, + "description": "If not `null`, the form key for the task." + }, + "camundaFormRef": { + "$ref": "#/components/schemas/CamundaFormRef" + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the tenant id of the task." + } + } + }, + "TaskEscalationDto": { + "type": "object", + "properties": { + "escalationCode": { + "type": "string", + "nullable": true, + "description": "An escalation code that indicates the predefined escalation. It is used to identify\nthe BPMN escalation handler." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs." + } + } + }, + "TaskQueryDto": { + "type": "object", + "description": "A Task query which defines a group of Tasks.", + "properties": { + "taskId": { + "type": "string", + "nullable": true, + "description": "Restrict to task with the given id." + }, + "taskIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks with any of the given ids." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to process instances with the given id." + }, + "processInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given ids." + }, + "processInstanceBusinessKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to process instances with the given business key." + }, + "processInstanceBusinessKeyExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to process instances with the given business key which \nis described by an expression. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + "processInstanceBusinessKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with one of the give business keys. \nThe keys need to be in a comma-separated list." + }, + "processInstanceBusinessKeyLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring." + }, + "processInstanceBusinessKeyLikeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring and is described by an expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a process definition with the given id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + "processDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with one of the given keys. The \nkeys need to be in a comma-separated list." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + "processDefinitionNameLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a process definition name that has the parameter value as \na substring." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to an execution with the given id." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to case instances with the given id." + }, + "caseInstanceBusinessKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to case instances with the given business key." + }, + "caseInstanceBusinessKeyLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a case instance business key that has the parameter value \nas a substring." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case definition with the given id." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + "caseDefinitionName": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + "caseDefinitionNameLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a case definition name that has the parameter value as a \nsubstring." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case execution with the given id." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated activity \ninstance ids." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated \ntenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which belong to no tenant. Value may only be `true`, \nas `false` is the default behavior." + }, + "assignee": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the given user is assigned to." + }, + "assigneeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the user described by the given expression is assigned to. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "assigneeLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have an assignee that has the parameter \nvalue as a substring." + }, + "assigneeLikeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have an assignee that has the parameter value described by the \ngiven expression as a substring. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "assigneeIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include tasks which are assigned to one of the passed and comma-separated user ids." + }, + "assigneeNotIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include tasks which are not assigned to one of the passed and comma-separated user ids." + }, + "owner": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the given user owns." + }, + "ownerExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the user described by the given expression owns. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "candidateGroup": { + "type": "string", + "nullable": true, + "description": "Only include tasks that are offered to the given group." + }, + "candidateGroupLike": { + "type": "string", + "nullable": true, + "description": "Only include tasks that are offered to groups that have the parameter value as a substring." + }, + "candidateGroupExpression": { + "type": "string", + "nullable": true, + "description": "Only include tasks that are offered to the group described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "candidateUser": { + "type": "string", + "nullable": true, + "description": "Only include tasks that are offered to the given user or to one of his groups." + }, + "candidateUserExpression": { + "type": "string", + "nullable": true, + "description": "Only include tasks that are offered to the user described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "includeAssignedTasks": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Also include tasks that are assigned to users in candidate queries. Default is to only \ninclude tasks that are not assigned to any user if you query by candidate user or\ngroup(s)." + }, + "involvedUser": { + "type": "string", + "nullable": true, + "description": "Only include tasks that the given user is involved in. A user is involved in a task if \nan identity link exists between task and user (e.g., the user is the assignee)." + }, + "involvedUserExpression": { + "type": "string", + "nullable": true, + "description": "Only include tasks that the user described by the given expression is involved in.\nA user is involved in a task if an identity link exists between task and user\n(e.g., the user is the assignee). See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + "assigned": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + "unassigned": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + "taskDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given key." + }, + "taskDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the given keys. The keys need to be in a comma-separated list." + }, + "taskDefinitionKeyLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a key that has the parameter value as a substring." + }, + "name": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given name." + }, + "nameNotEqual": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that do not have the given name." + }, + "nameLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + "nameNotLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that do not have a name with the given parameter\nvalue as substring." + }, + "description": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given description." + }, + "descriptionLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a description that has the parameter\nvalue as a substring." + }, + "priority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Restrict to tasks that have the given priority." + }, + "maxPriority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Restrict to tasks that have a lower or equal priority." + }, + "minPriority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Restrict to tasks that have a higher or equal priority." + }, + "dueDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.546+0200`." + }, + "dueDateExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are due on the date described by the given expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "dueAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.435+0200`." + }, + "dueAfterExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are due after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "dueBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.243+0200`." + }, + "dueBeforeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are due before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "withoutDueDate": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which have no due date. Value may only be `true`, \nas `false` is the default behavior." + }, + "followUpDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have a followUp date on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.342+0200`." + }, + "followUpDateExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a followUp date on the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "followUpAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have a followUp date after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.542+0200`." + }, + "followUpAfterExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a followUp date after the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "followUpBefore": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a followUp date before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.234+0200`." + }, + "followUpBeforeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a followUp date before the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "followUpBeforeOrNotExistent": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have no followUp date or a followUp date before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.432+0200`. The typical use case\nis to query all `active` tasks for a user for a given date." + }, + "followUpBeforeOrNotExistentExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have no followUp date or a followUp date before the date\ndescribed by the given expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "createdOn": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were created on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.324+0200`." + }, + "createdOnExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that were created on the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "createdAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were created after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must\nhave the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.342+0200`." + }, + "createdAfterExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that were created after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "createdBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were created before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must\nhave the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + "createdBeforeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that were created before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "updatedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were updated after the given date. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must\nhave the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + "updatedAfterExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that were updated after the date described by the given expression. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "delegationState": { + "type": "string", + "nullable": true, + "enum": [ + "PENDING", + "RESOLVED" + ], + "description": "Restrict to tasks that are in the given delegation state. Valid values are\n`PENDING` and `RESOLVED`." + }, + "candidateGroups": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that are offered to any of the given candidate groups. Takes a\ncomma-separated list of group names, so for example\n`developers,support,sales`." + }, + "candidateGroupsExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are offered to any of the candidate groups described by the\ngiven expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to\n`java.util.List` of Strings." + }, + "withCandidateGroups": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + "withoutCandidateGroups": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + "withCandidateUsers": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which have a candidate user. Value may only be `true`,\nas `false` is the default behavior." + }, + "withoutCandidateUsers": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which have no candidate users. Value may only be `true`,\nas `false` is the default behavior." + }, + "active": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include active tasks. Value may only be `true`, as `false`\nis the default behavior." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include suspended tasks. Value may only be `true`, as\n`false` is the default behavior." + }, + "taskVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "A JSON array to only include tasks that have variables with certain values. The\narray consists of JSON objects with three properties `name`, `operator` and `value`.\n`name` is the variable name, `operator` is the comparison operator to be used and\n`value` the variable value. `value` may be of type `String`, `Number` or `Boolean`.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + "processVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "A JSON array to only include tasks that belong to a process instance with variables\nwith certain values. The array consists of JSON objects with three properties\n`name`, `operator` and `value`. `name` is the variable name, `operator` is the\ncomparison operator to be used and `value` the variable value. `value` may be of\ntype `String`, `Number` or `Boolean`.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`;\n`notLike`.\n`key` and `value` may not contain underscore or comma characters." + }, + "caseInstanceVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "A JSON array to only include tasks that belong to a case instance with variables\nwith certain values. The array consists of JSON objects with three properties\n`name`, `operator` and `value`. `name` is the variable name, `operator` is the\ncomparison operator to be used and `value` the variable value. `value` may be of\ntype `String`, `Number` or `Boolean`.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Match all variable names in this query case-insensitively. If set\n`variableName` and `variablename` are treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Match all variable values in this query case-insensitively. If set\n`variableValue` and `variablevalue` are treated as equal." + }, + "parentTaskId": { + "type": "string", + "nullable": true, + "description": "Restrict query to all tasks that are sub tasks of the given task. Takes a task id." + }, + "orQueries": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TaskQueryDto" + }, + "description": "A JSON array of nested task queries with OR semantics. A task matches a nested query if it fulfills\n*at least one* of the query\u0027s predicates. With multiple nested queries, a task must fulfill at least one predicate of *each* query ([Conjunctive Normal Form](https://en.wikipedia.org/wiki/Conjunctive_normal_form)).\n\nAll task query properties can be used except for: `sorting`, `withCandidateGroups`,\n`withoutCandidateGroups`, `withCandidateUsers`, `withoutCandidateUsers`\n\nSee the [User guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-engine-api/#or-queries)\nfor more information about OR queries." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "instanceId", + "caseInstanceId", + "dueDate", + "executionId", + "caseExecutionId", + "assignee", + "created", + "lastUpdated", + "followUpDate", + "description", + "id", + "name", + "nameCaseInsensitive", + "priority", + "processVariable", + "executionVariable", + "taskVariable", + "caseExecutionVariable", + "caseInstanceVariable" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + }, + "parameters": { + "$ref": "#/components/schemas/SortTaskQueryParametersDto" + } + } + } + } + } + }, + "TaskWithAttachmentAndCommentDto": { + "allOf": [ + { + "type": "object", + "properties": { + "attachment": { + "type": "boolean", + "nullable": true, + "description": "Specifies if an attachment exists for the task." + }, + "comment": { + "type": "boolean", + "nullable": true, + "description": "Specifies if an comment exists for the task." + } + } + }, + { + "$ref": "#/components/schemas/TaskDto" + } + ] + }, + "TelemetryConfigurationDto": { + "type": "object", + "properties": { + "enableTelemetry": { + "type": "boolean", + "nullable": true, + "description": "Specifies if the telemetry data should be sent or not." + } + } + }, + "TelemetryCountDto": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "An integer value representing the count for this metric." + } + } + }, + "TelemetryDataDto": { + "type": "object", + "properties": { + "installation": { + "type": "string", + "nullable": true, + "description": "An id which is unique for each installation of Camunda. It is stored once per database so all\nengines connected to the same database will have the same installation ID.\nThe ID is used to identify a single installation of Camunda Platform." + }, + "product": { + "$ref": "#/components/schemas/TelemetryProductDto" + } + } + }, + "TelemetryInternalsDto": { + "type": "object", + "properties": { + "database": { + "$ref": "#/components/schemas/AbstractVendorVersionInformationDto" + }, + "application-server": { + "$ref": "#/components/schemas/AbstractVendorVersionInformationDto" + }, + "license-key": { + "$ref": "#/components/schemas/TelemetryLicenseKeyDto" + }, + "camunda-integration": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "List of Camunda integrations used (e.g., Camunda Spring Boot Starter, Camunda Run, WildFly/JBoss subsystem, Camunda EJB)." + }, + "commands": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TelemetryCountDto" + }, + "description": "The count of executed commands after the last retrieved data." + }, + "metrics": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TelemetryCountDto" + }, + "description": "The collected metrics are the number of root process instance executions started, the number of activity instances started or also known as flow node instances, and the number of executed decision instances and elements." + }, + "webapps": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The webapps enabled in this installation of Camunda." + }, + "jdk": { + "$ref": "#/components/schemas/AbstractVendorVersionInformationDto" + }, + "data-collection-start-date": { + "type": "string", + "format": "date-time", + "description": "The date when the engine started to collect dynamic data, such as command executions and metrics. If telemetry sending is enabled, dynamic data resets on sending the data to Camunda.\nDynamic data and the date returned by this method are reset in three cases: engine startup, after engine start when sending telemetry data to Camunda is enabled via API, after sending telemetry data to Camunda (only when this was enabled)\nThe date is in the format \u003ccode\u003eYYYY-MM-DD\u0027T\u0027HH:mm:ss.SSSZ\u003c/code\u003e." + } + } + }, + "TelemetryLicenseKeyDto": { + "type": "object", + "properties": { + "customer": { + "type": "string", + "nullable": true, + "description": "The name of the customer the license was issued for." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The license type." + }, + "valid-until": { + "type": "string", + "format": "date", + "nullable": true, + "description": "The expiration date of the license." + }, + "unlimited": { + "type": "boolean", + "nullable": true, + "description": "Flag that indicates if the license is unlimited." + }, + "features": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "A map of features included in the license." + }, + "raw": { + "type": "string", + "nullable": true, + "description": "The raw license information." + } + } + }, + "TelemetryProductDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "The name of the product (i.e., Camunda BPM Runtime)." + }, + "version": { + "type": "string", + "nullable": true, + "description": "The version of the process engine (i.e., 7.X.Y)." + }, + "edition": { + "type": "string", + "nullable": true, + "description": "The edition of the product (i.e., either community or enterprise)." + }, + "internals": { + "$ref": "#/components/schemas/TelemetryInternalsDto" + } + } + }, + "TenantDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the tenant." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the tenant." + } + } + }, + "TransitionInstanceDto": { + "type": "object", + "description": "A JSON object corresponding to the Activity Instance tree of the given process instance.", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the transition instance." + }, + "parentActivityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent activity instance, for example a sub process instance." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job)" + }, + "activityName": { + "type": "string", + "nullable": true, + "description": "The name of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job)" + }, + "activityType": { + "type": "string", + "nullable": true, + "description": "The type of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job)" + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance this instance is part of." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution id." + }, + "incidentIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of incident ids." + }, + "incidents": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ActivityInstanceIncidentDto" + }, + "description": "A list of JSON objects containing incident specific properties:\n* `id`: the id of the incident\n* `activityId`: the activity id in which the incident occurred" + } + } + }, + "TriggerVariableValueDto": { + "allOf": [ + { + "type": "object", + "properties": { + "local": { + "type": "boolean", + "nullable": true, + "description": "Indicates whether the variable should be a local variable or not.\nIf set to true, the variable becomes a local variable of the execution\nentering the target activity." + } + } + }, + { + "$ref": "#/components/schemas/VariableValueDto" + } + ] + }, + "UserCredentialsDto": { + "type": "object", + "properties": { + "password": { + "type": "string", + "nullable": true, + "description": "The users new password." + }, + "authenticatedUserPassword": { + "type": "string", + "nullable": true, + "description": "The password of the authenticated user who changes the password of the user\n(i.e., the user with passed id as path parameter)." + } + } + }, + "UserDto": { + "type": "object", + "properties": { + "profile": { + "$ref": "#/components/schemas/UserProfileDto" + }, + "credentials": { + "$ref": "#/components/schemas/UserCredentialsDto" + } + } + }, + "UserIdDto": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user that the current action refers to." + } + } + }, + "UserOperationLogEntryDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The unique identifier of this log entry." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The user who performed this operation." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of this operation." + }, + "operationId": { + "type": "string", + "nullable": true, + "description": "The unique identifier of this operation. A composite operation that changes\nmultiple properties has a common `operationId`." + }, + "operationType": { + "type": "string", + "nullable": true, + "description": "The type of this operation, e.g., `Assign`, `Claim` and so on." + }, + "entityType": { + "type": "string", + "nullable": true, + "description": "The type of the entity on which this operation was executed, e.g., `Task` or\n`Attachment`." + }, + "category": { + "type": "string", + "nullable": true, + "description": "The name of the category this operation was associated with, e.g., `TaskWorker` or\n`Admin`." + }, + "annotation": { + "type": "string", + "nullable": true, + "description": "An arbitrary annotation set by a user for auditing reasons." + }, + "property": { + "type": "string", + "nullable": true, + "description": "The property changed by this operation." + }, + "orgValue": { + "type": "string", + "nullable": true, + "description": "The original value of the changed property." + }, + "newValue": { + "type": "string", + "nullable": true, + "description": "The new value of the changed property." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this\ndeployment." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this process\ndefinition." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to process\ndefinitions with this key." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this process\ninstance." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this\nexecution." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this case\ndefinition." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this case\ninstance." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this case\nexecution." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this task." + }, + "externalTaskId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this external task." + }, + "batchId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this batch." + }, + "jobId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this job." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this job\ndefinition." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the entry should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this entry." + } + } + }, + "UserProfileDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the user." + }, + "firstName": { + "type": "string", + "nullable": true, + "description": "The first name of the user." + }, + "lastName": { + "type": "string", + "nullable": true, + "description": "The first name of the user." + }, + "email": { + "type": "string", + "nullable": true, + "description": "The email of the user." + } + } + }, + "VariableInstanceDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the variable instance." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the variable instance." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this variable instance belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance that this variable instance belongs to." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution that this variable instance belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance that this variable instance belongs to." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "The id of the case execution that this variable instance belongs to." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task that this variable instance belongs to." + }, + "batchId": { + "type": "string", + "nullable": true, + "description": "The id of the batch that this variable instance belongs to.\u003c" + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance that this variable instance belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant that this variable instance belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message in case a Java Serialized Object could not be de-serialized." + } + } + }, + { + "$ref": "#/components/schemas/VariableValueDto" + } + ] + }, + "VariableInstanceQueryDto": { + "type": "object", + "description": "A variable instance query which defines a list of variable instances", + "properties": { + "variableName": { + "type": "string", + "nullable": true, + "description": "Filter by variable instance name." + }, + "variableNameLike": { + "type": "string", + "nullable": true, + "description": "Filter by the variable instance name. The parameter can include the wildcard `%` to\nexpress like-strategy such as: starts with (`%`name), ends with (name`%`) or\ncontains (`%`name`%`)." + }, + "processInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed \nprocess instance ids." + }, + "executionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed \nexecution ids." + }, + "caseInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed case instance ids." + }, + "caseExecutionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed case execution ids." + }, + "taskIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed task\nids." + }, + "batchIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed \nbatch ids." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed \nactivity instance ids." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed \ntenant ids." + }, + "variableValues": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "An array to only include variable instances that have the certain values.\nThe array consists of objects with the three properties `name`, `operator` and `value`. `name (String)` is the\nvariable name, `operator (String)` is the comparison operator to be used and `value` the variable value.\n`value` may be `String`, `Number` or `Boolean`.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater\nthan or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`" + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable names provided in `variableValues` case-insensitively. If set to `true`\n**variableName** and **variablename** are treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable values provided in `variableValues` case-insensitively. If set to\n`true` **variableValue** and **variablevalue** are treated as equal." + }, + "variableScopeIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of passed scope ids." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is an object that specifies one ordering.\n The position in the array identifies the rank of an ordering, i.e., whether it is primary, secondary, etc.\n Sorting has no effect for `count` endpoints", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "variableName", + "variableType", + "activityInstanceId", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "VariableQueryParameterDto": { + "allOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "Variable name" + } + } + }, + { + "$ref": "#/components/schemas/ConditionQueryParameterDto" + } + ] + }, + "VariableValueDto": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/AnyValue" + }, + "type": { + "type": "string", + "nullable": true, + "description": "The value type of the variable." + }, + "valueInfo": { + "type": "object", + "additionalProperties": true, + "description": "A JSON object containing additional, value-type-dependent properties.\nFor serialized variables of type Object, the following properties can be provided:\n\n* `objectTypeName`: A string representation of the object\u0027s type name.\n* `serializationDataFormat`: The serialization format used to store the variable.\n\nFor serialized variables of type File, the following properties can be provided:\n\n* `filename`: The name of the file. This is not the variable name but the name that will be used when downloading the file again.\n* `mimetype`: The MIME type of the file that is being uploaded.\n* `encoding`: The encoding of the file that is being uploaded.\n\nThe following property can be provided for all value types:\n\n* `transient`: Indicates whether the variable should be transient or\nnot. See [documentation](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables#transient-variables) for more informations.\n(Not applicable for `decision-definition`, ` /process-instance/variables-async`, and `/migration/executeAsync` endpoints)" + } + } + }, + "VersionDto": { + "type": "object", + "properties": { + "version": { + "type": "string", + "nullable": true, + "description": "The version of the Rest API." + } + } + } + } + } +} diff --git a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApis/openapi-3.0.3.json b/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.0.3.json similarity index 100% rename from tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApis/openapi-3.0.3.json rename to tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.0.3.json diff --git a/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.1.0.json b/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.1.0.json new file mode 100644 index 0000000..6d6ff03 --- /dev/null +++ b/tests/OpenApi.Client.Cli.UnitTests/OpenApis/openapi-3.1.0.json @@ -0,0 +1,261 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Tic Tac Toe", + "description": "This API allows writing down marks on a Tic Tac Toe board\nand requesting the state of the board or of individual squares.\n", + "version": "1.0.0" + }, + "tags": [ + { + "name": "Gameplay" + } + ], + "paths": { + "/board": { + "get": { + "summary": "Get the whole board", + "description": "Retrieves the current state of the board and the winner.", + "tags": [ "Gameplay" ], + "operationId": "get-board", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/status" + } + } + } + } + }, + "security": [ + { + "defaultApiKey": [] + }, + { + "app2AppOauth": [ "board:read" ] + } + ] + } + }, + "/board/{row}/{column}": { + "parameters": [ + { + "$ref": "#/components/parameters/rowParam" + }, + { + "$ref": "#/components/parameters/columnParam" + } + ], + "get": { + "summary": "Get a single board square", + "description": "Retrieves the requested square.", + "tags": [ "Gameplay" ], + "operationId": "get-square", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/mark" + } + } + } + }, + "400": { + "description": "The provided parameters are incorrect", + "content": { + "text/html": { + "schema": { + "$ref": "#/components/schemas/errorMessage" + }, + "example": "Illegal coordinates" + } + } + } + }, + "security": [ + { + "bearerHttpAuthentication": [] + }, + { + "user2AppOauth": [ "board:read" ] + } + ] + }, + "put": { + "summary": "Set a single board square", + "description": "Places a mark on the board and retrieves the whole board and the winner (if any).", + "tags": [ "Gameplay" ], + "operationId": "put-square", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/mark" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/status" + } + } + } + }, + "400": { + "description": "The provided parameters are incorrect", + "content": { + "text/html": { + "schema": { + "$ref": "#/components/schemas/errorMessage" + }, + "examples": { + "illegalCoordinates": { + "value": "Illegal coordinates." + }, + "notEmpty": { + "value": "Square is not empty." + }, + "invalidMark": { + "value": "Invalid Mark (X or O)." + } + } + } + } + } + }, + "security": [ + { + "bearerHttpAuthentication": [] + }, + { + "user2AppOauth": [ "board:write" ] + } + ] + } + } + }, + "components": { + "parameters": { + "rowParam": { + "description": "Board row (vertical coordinate)", + "name": "row", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/coordinate" + } + }, + "columnParam": { + "description": "Board column (horizontal coordinate)", + "name": "column", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/coordinate" + } + } + }, + "schemas": { + "errorMessage": { + "type": "string", + "maxLength": 256, + "description": "A text message describing an error" + }, + "coordinate": { + "type": "integer", + "minimum": 1, + "maximum": 3, + "example": 1 + }, + "mark": { + "type": "string", + "enum": [ ".", "X", "O" ], + "description": "Possible values for a board square. `.` means empty square.", + "example": "." + }, + "board": { + "type": "array", + "maxItems": 3, + "minItems": 3, + "items": { + "type": "array", + "maxItems": 3, + "minItems": 3, + "items": { + "$ref": "#/components/schemas/mark" + } + } + }, + "winner": { + "type": "string", + "enum": [ ".", "X", "O" ], + "description": "Winner of the game. `.` means nobody has won yet.", + "example": "." + }, + "status": { + "type": "object", + "properties": { + "winner": { + "$ref": "#/components/schemas/winner" + }, + "board": { + "$ref": "#/components/schemas/board" + } + } + } + }, + "securitySchemes": { + "defaultApiKey": { + "description": "API key provided in console", + "type": "apiKey", + "name": "api-key", + "in": "header" + }, + "basicHttpAuthentication": { + "description": "Basic HTTP Authentication", + "type": "http", + "scheme": "Basic" + }, + "bearerHttpAuthentication": { + "description": "Bearer token using a JWT", + "type": "http", + "scheme": "Bearer", + "bearerFormat": "JWT" + }, + "app2AppOauth": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "https://learn.openapis.org/oauth/2.0/token", + "scopes": { + "board:read": "Read the board" + } + } + } + }, + "user2AppOauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://learn.openapis.org/oauth/2.0/auth", + "tokenUrl": "https://learn.openapis.org/oauth/2.0/token", + "scopes": { + "board:read": "Read the board", + "board:write": "Write to the board" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Contracts/OpenApiContractParserTests.cs b/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Contracts/OpenApiContractParserTests.cs deleted file mode 100644 index 275655d..0000000 --- a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Contracts/OpenApiContractParserTests.cs +++ /dev/null @@ -1,77 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using Microsoft.CodeAnalysis; -using OpenApi.Client.SourceGenerators.Contracts; -using OpenApi.Client.SourceGenerators.Schema; -using OpenApi.Client.SourceGenerators.Serialization; - -namespace OpenApi.Client.SourceGenerators.Roslyn431.UnitTests.Contracts; - -public sealed class OpenApiContractParserTests -{ - [Fact] - public void Parse_ShouldReturnOpenApiContractWithExpectedValues() - { - IApiDocument document = Substitute.For(); - document.GetTitle().Returns("TestTitle"); - document.GetDescription().Returns("TestDescription"); - document.GetLicense().Returns("TestLicense"); - document.GetVersion().Returns("TestVersion"); - - OpenApiContract result = OpenApiContractParser.Parse( - "TestNamespace", - "TestClass", - Accessibility.Public, - document - ); - - result.Namespace.Should().Be("TestNamespace"); - result.ClassName.Should().Be("TestClass"); - result.Access.Should().Be("public"); - result.Title.Should().Be("TestTitle"); - result.Description.Should().Be("TestDescription"); - result.License.Should().Be("TestLicense"); - result.Version.Should().Be("TestVersion"); - result.Paths.Should().BeEmpty(); - result.Types.Should().BeEmpty(); - } - - [Fact] - public void Parse_ShouldReturnOpenApiContractWithPaths() - { - string jsonString = File.ReadAllText("OpenApis/openapi-3.0.1.extended.json"); - OpenApiSerializer serializer = new(); - - IApiDocument apiDocument = serializer.Deserialize("test-name", jsonString).Result!; - - OpenApiContract result = OpenApiContractParser.Parse( - "TestNamespace", - "TestClass", - Accessibility.Public, - apiDocument - ); - - result.Paths.Should().HaveCount(3); - } - - [Fact] - public void Parse_ShouldReturnOpenApiContractWithTypes() - { - string jsonString = File.ReadAllText("OpenApis/openapi-3.0.1.extended.json"); - OpenApiSerializer serializer = new(); - - IApiDocument apiDocument = serializer.Deserialize("test-name", jsonString).Result!; - - OpenApiContract result = OpenApiContractParser.Parse( - "TestNamespace", - "TestClass", - Accessibility.Public, - apiDocument - ); - - result.Types.Should().HaveCount(5); - } -} diff --git a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApis/openapi-3.1.0.json b/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApis/openapi-3.1.0.json deleted file mode 100644 index c1ff997..0000000 --- a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/OpenApis/openapi-3.1.0.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "Non-oAuth Scopes example", - "version": "1.5.0" - }, - "paths": { - "/users": { - "get": { - "security": [ - { - "bearerAuth": [ - "read:users", - "public" - ] - } - ] - } - } - }, - "components": { - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "jwt", - "description": "note: non-oauth scopes are not defined at the securityScheme level" - } - } - } -} \ No newline at end of file diff --git a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Serialization/OpenApiSerializerTests.cs b/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Serialization/OpenApiSerializerTests.cs deleted file mode 100644 index bff675d..0000000 --- a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Serialization/OpenApiSerializerTests.cs +++ /dev/null @@ -1,64 +0,0 @@ -// This Source Code Form is subject to the terms of the MIT License. -// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. -// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. -// All Rights Reserved. - -using System.Linq; -using OpenApi.Client.SourceGenerators.Schema; -using OpenApi.Client.SourceGenerators.Serialization; - -namespace OpenApi.Client.SourceGenerators.Roslyn431.UnitTests.Serialization; - -public sealed class OpenApiSerializerTests -{ - [Theory] - [InlineData("OpenApis/openapi-1.2.0.json", "1.3.0")] - [InlineData("OpenApis/openapi-2.0.0.json", "v2")] - [InlineData("OpenApis/openapi-3.0.3.json", "2.0.0")] - [InlineData("OpenApis/openapi-3.1.0.json", "1.5.0")] - public void Deserialize_ShouldReturnApiVersion(string jsonFile, string expectedVersion) - { - string jsonString = File.ReadAllText(jsonFile); - OpenApiSerializer serializer = new(); - - SerializationResult serializationResult = serializer.Deserialize( - "test-name", - jsonString - ); - - serializationResult.HasErrors.Should().BeFalse(); - serializationResult.Result?.GetVersion().Should().BeEquivalentTo(expectedVersion); - } - - [Fact] - public void Deserialize_ShouldReturnPaths() - { - string jsonString = File.ReadAllText("OpenApis/openapi-3.0.1.extended.json"); - OpenApiSerializer serializer = new(); - - SerializationResult serializationResult = serializer.Deserialize( - "test-name", - jsonString - ); - - ApiDocumentPath[] paths = serializationResult.Result!.GetPaths().ToArray(); - - paths.Should().HaveCount(3); - } - - [Fact] - public void Deserialize_ShouldReturnTypes() - { - string jsonString = File.ReadAllText("OpenApis/openapi-3.0.1.extended.json"); - OpenApiSerializer serializer = new(); - - SerializationResult serializationResult = serializer.Deserialize( - "test-name", - jsonString - ); - - ApiDocumentType[] types = serializationResult.Result!.GetTypes().ToArray(); - - types.Should().HaveCount(5); - } -} diff --git a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Converters/CamelCaseConverterTests.cs b/tests/OpenApi.Client.SourceGenerators.UnitTests/CamelCaseConverterTests.cs similarity index 94% rename from tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Converters/CamelCaseConverterTests.cs rename to tests/OpenApi.Client.SourceGenerators.UnitTests/CamelCaseConverterTests.cs index ce637cb..ca1b423 100644 --- a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Converters/CamelCaseConverterTests.cs +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/CamelCaseConverterTests.cs @@ -5,7 +5,7 @@ using OpenApi.Client.SourceGenerators.Converters; -namespace OpenApi.Client.SourceGenerators.Roslyn431.UnitTests.Converters; +namespace OpenApi.Client.SourceGenerators.UnitTests; public sealed class CamelCaseConverterTests { diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/ClientGeneratorTests.cs b/tests/OpenApi.Client.SourceGenerators.UnitTests/ClientGeneratorTests.cs new file mode 100644 index 0000000..826de3d --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/ClientGeneratorTests.cs @@ -0,0 +1,41 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +using OpenApi.Client.SourceGenerators.Client; + +namespace OpenApi.Client.SourceGenerators.UnitTests; + +public sealed class ClientGeneratorTests +{ + [Theory] + // [InlineData("OpenApis/openapi-1.2.0.json")] + [InlineData("OpenApis/openapi-2.0.0.json")] + [InlineData("OpenApis/openapi-3.0.0.json")] + [InlineData("OpenApis/openapi-3.0.3.json")] + [InlineData("OpenApis/openapi-3.0.1.extended.json")] + [InlineData("OpenApis/openapi-3.0.2.extended.json")] + [InlineData("OpenApis/openapi-3.1.0.json")] + public async Task GenerateShouldCreateNotEmptyFile(string file) + { + FileStream fileStream = File.OpenRead(file); + + ClientGenerator generator = new( + new GeneratorData + { + Source = fileStream, + NamespaceName = "MyCompany.SimpleOverview", + ClassName = "SimpleOverviewClient", + Access = Accessibility.Public, + SerializationTool = SerializationTool.SystemTextJson, + Templates = null, + } + ); + + GenerationResult generatorResult = await generator.GenerateAsync(); + + generatorResult.GeneratedClient.Should().NotBeNullOrWhiteSpace(); + generatorResult.Errors.Should().BeEmpty(); + } +} diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/CodeAnalysis/IncrementalGeneratorExtensions.cs b/tests/OpenApi.Client.SourceGenerators.UnitTests/CodeAnalysis/IncrementalGeneratorExtensions.cs new file mode 100644 index 0000000..eea40b3 --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/CodeAnalysis/IncrementalGeneratorExtensions.cs @@ -0,0 +1,50 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp; + +namespace OpenApi.Client.SourceGenerators.UnitTests.CodeAnalysis; + +public static class IncrementalGeneratorExtensions +{ + /// + /// Creates a for the specified generator and source code. + /// + public static GeneratorDriver CreateDriver( + this IIncrementalGenerator generator, + string? sourceCode = null, + params AdditionalText[] additionalTexts + ) + { + SyntaxTree syntaxTree = CSharpSyntaxTree.ParseText( + sourceCode + ?? """ + + """ + ); + + IEnumerable references = + [ + MetadataReference.CreateFromFile(typeof(IncrementalGeneratorExtensions).Assembly.Location), + ]; + + CSharpCompilation compilation = CSharpCompilation.Create( + assemblyName: "OpenApiClientUnitTest", + syntaxTrees: [syntaxTree], + references: references + ); + + List generators = [generator]; + + GeneratorDriver driver = CSharpGeneratorDriver.Create( + generators: generators.Select(GeneratorExtensions.AsSourceGenerator), + additionalTexts: additionalTexts + ); + + return driver.RunGenerators(compilation); + } +} diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/CodeAnalysis/JsonAdditionalText.cs b/tests/OpenApi.Client.SourceGenerators.UnitTests/CodeAnalysis/JsonAdditionalText.cs new file mode 100644 index 0000000..f46fd97 --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/CodeAnalysis/JsonAdditionalText.cs @@ -0,0 +1,35 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +namespace OpenApi.Client.SourceGenerators.UnitTests.CodeAnalysis; + +/// +/// Represents an additional text file containing JSON data for OpenAPI client generation. +/// +public sealed class JsonAdditionalText(string path, string contents) : AdditionalText +{ + /// + public override string Path => path; + + /// + public override SourceText? GetText(CancellationToken cancellationToken = new CancellationToken()) => + SourceText.From(contents, Encoding.UTF8); + + /// + /// Creates an instance of from a file. + /// + public static JsonAdditionalText FromFile(string filePath) + { + if (!File.Exists(filePath)) + { + throw new FileNotFoundException($"The file '{filePath}' does not exist.", filePath); + } + + string name = System.IO.Path.GetFileName(filePath); + string contents = File.ReadAllText(filePath, Encoding.UTF8); + + return new JsonAdditionalText(name, contents); + } +} diff --git a/src/OpenApi.Client.SourceGenerators/Usings.cs b/tests/OpenApi.Client.SourceGenerators.UnitTests/GlobalUsings.cs similarity index 67% rename from src/OpenApi.Client.SourceGenerators/Usings.cs rename to tests/OpenApi.Client.SourceGenerators.UnitTests/GlobalUsings.cs index fbb687b..79b8e76 100644 --- a/src/OpenApi.Client.SourceGenerators/Usings.cs +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/GlobalUsings.cs @@ -3,13 +3,12 @@ // Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. // All Rights Reserved. -global using System; -global using System.Collections; -global using System.Collections.Generic; global using System.Collections.Immutable; global using System.IO; -global using System.Linq; global using System.Text; -global using System.Text.Json; -global using System.Text.Json.Serialization; global using System.Threading; +global using System.Threading.Tasks; +global using AwesomeAssertions; +global using Microsoft.CodeAnalysis; +global using Microsoft.CodeAnalysis.Text; +global using Xunit; diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApi.Client.SourceGenerators.UnitTests.csproj b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApi.Client.SourceGenerators.UnitTests.csproj new file mode 100644 index 0000000..d38dd65 --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApi.Client.SourceGenerators.UnitTests.csproj @@ -0,0 +1,51 @@ + + + $(CommonTargetFramework) + false + true + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-1.2.0.json b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-1.2.0.json new file mode 100644 index 0000000..b2a8279 --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-1.2.0.json @@ -0,0 +1,60 @@ +{ + "apiVersion": "1.3.0", + "swaggerVersion": "1.2", + "apis": [ + { + "path": "/pet", + "description": "Operations about pets" + }, + { + "path": "/user", + "description": "Operations about user" + }, + { + "path": "/store", + "description": "Operations about store" + } + ], + "authorizations": { + "oauth2": { + "type": "oauth2", + "scopes": [ + { + "scope": "email", + "description": "Access to your email address" + }, + { + "scope": "pets", + "description": "Access to your pets" + } + ], + "grantTypes": { + "implicit": { + "loginEndpoint": { + "url": "http://petstore.swagger.wordnik.com/oauth/dialog" + }, + "tokenName": "access_token" + }, + "authorization_code": { + "tokenRequestEndpoint": { + "url": "http://petstore.swagger.wordnik.com/oauth/requestToken", + "clientIdName": "client_id", + "clientSecretName": "client_secret" + }, + "tokenEndpoint": { + "url": "http://petstore.swagger.wordnik.com/oauth/token", + "tokenName": "access_code" + } + } + } + } + }, + "info": { + "title": "Swagger Sample App", + "description": "This is a sample server Petstore server", + "termsOfServiceUrl": "http://swagger.io/terms/", + "contact": "apiteam@wordnik.com", + "license": "Apache 2.0", + "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.html" + } +} \ No newline at end of file diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-2.0.0.json b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-2.0.0.json new file mode 100644 index 0000000..e1b371a --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-2.0.0.json @@ -0,0 +1,58 @@ +{ + "swagger": "2.0", + "info": { + "title": "Simple API overview", + "version": "v2" + }, + "paths": { + "/": { + "get": { + "operationId": "listVersionsv2", + "summary": "List API versions", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 300 response", + "examples": { + "application/json": "{\n \"versions\": [\n {\n \"status\": \"CURRENT\",\n \"updated\": \"2011-01-21T11:33:21Z\",\n \"id\": \"v2.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v2/\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"status\": \"EXPERIMENTAL\",\n \"updated\": \"2013-07-23T11:33:21Z\",\n \"id\": \"v3.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v3/\",\n \"rel\": \"self\"\n }\n ]\n }\n ]\n}" + } + }, + "300": { + "description": "200 300 response", + "examples": { + "application/json": "{\n \"versions\": [\n {\n \"status\": \"CURRENT\",\n \"updated\": \"2011-01-21T11:33:21Z\",\n \"id\": \"v2.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v2/\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"status\": \"EXPERIMENTAL\",\n \"updated\": \"2013-07-23T11:33:21Z\",\n \"id\": \"v3.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v3/\",\n \"rel\": \"self\"\n }\n ]\n }\n ]\n}" + } + } + } + } + }, + "/v2": { + "get": { + "operationId": "getVersionDetailsv2", + "summary": "Show API version details", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 203 response", + "examples": { + "application/json": "{\n \"version\": {\n \"status\": \"CURRENT\",\n \"updated\": \"2011-01-21T11:33:21Z\",\n \"media-types\": [\n {\n \"base\": \"application/xml\",\n \"type\": \"application/vnd.openstack.compute+xml;version=2\"\n },\n {\n \"base\": \"application/json\",\n \"type\": \"application/vnd.openstack.compute+json;version=2\"\n }\n ],\n \"id\": \"v2.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v2/\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf\",\n \"type\": \"application/pdf\",\n \"rel\": \"describedby\"\n },\n {\n \"href\": \"http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl\",\n \"type\": \"application/vnd.sun.wadl+xml\",\n \"rel\": \"describedby\"\n },\n {\n \"href\": \"http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl\",\n \"type\": \"application/vnd.sun.wadl+xml\",\n \"rel\": \"describedby\"\n }\n ]\n }\n}" + } + }, + "203": { + "description": "200 203 response", + "examples": { + "application/json": "{\n \"version\": {\n \"status\": \"CURRENT\",\n \"updated\": \"2011-01-21T11:33:21Z\",\n \"media-types\": [\n {\n \"base\": \"application/xml\",\n \"type\": \"application/vnd.openstack.compute+xml;version=2\"\n },\n {\n \"base\": \"application/json\",\n \"type\": \"application/vnd.openstack.compute+json;version=2\"\n }\n ],\n \"id\": \"v2.0\",\n \"links\": [\n {\n \"href\": \"http://23.253.228.211:8774/v2/\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf\",\n \"type\": \"application/pdf\",\n \"rel\": \"describedby\"\n },\n {\n \"href\": \"http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl\",\n \"type\": \"application/vnd.sun.wadl+xml\",\n \"rel\": \"describedby\"\n }\n ]\n }\n}" + } + } + } + } + } + }, + "consumes": [ + "application/json" + ] +} \ No newline at end of file diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.0.json b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.0.json new file mode 100644 index 0000000..31d2e9b --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.0.json @@ -0,0 +1,192 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Simple API overview", + "version": "2.0.0" + }, + "paths": { + "/": { + "get": { + "operationId": "listVersionsv2", + "summary": "List API versions", + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "versions": [ + { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + } + ] + }, + { + "status": "EXPERIMENTAL", + "updated": "2013-07-23T11:33:21Z", + "id": "v3.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v3/", + "rel": "self" + } + ] + } + ] + } + } + } + } + } + }, + "300": { + "description": "300 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "versions": [ + { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + } + ] + }, + { + "status": "EXPERIMENTAL", + "updated": "2013-07-23T11:33:21Z", + "id": "v3.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v3/", + "rel": "self" + } + ] + } + ] + } + } + } + } + } + } + } + } + }, + "/v2": { + "get": { + "operationId": "getVersionDetailsv2", + "summary": "Show API version details", + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "version": { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "media-types": [ + { + "base": "application/xml", + "type": "application/vnd.openstack.compute+xml;version=2" + }, + { + "base": "application/json", + "type": "application/vnd.openstack.compute+json;version=2" + } + ], + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", + "type": "application/pdf", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + } + ] + } + } + } + } + } + } + }, + "203": { + "description": "203 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "version": { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "media-types": [ + { + "base": "application/xml", + "type": "application/vnd.openstack.compute+xml;version=2" + }, + { + "base": "application/json", + "type": "application/vnd.openstack.compute+json;version=2" + } + ], + "id": "v2.0", + "links": [ + { + "href": "http://23.253.228.211:8774/v2/", + "rel": "self" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", + "type": "application/pdf", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + } + ] + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.1.extended.json b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.1.extended.json new file mode 100644 index 0000000..4dcf454 --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.1.extended.json @@ -0,0 +1,343 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Profile API", + "description": "Profile API for common user", + "version": "1.0" + }, + "paths": { + "/admin-service/users": { + "post": { + "tags": [ + "User" + ], + "summary": "Create user.", + "description": "Create new user.", + "operationId": "CreateUser", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreateUserRequest" + } + } + } + }, + "responses": { + "202": { + "description": "The user creation request was accepted." + }, + "400": { + "description": "Server will not process the request due to something that is perceived to be a client error." + }, + "401": { + "description": "No valid authentication credentials for the requested resource." + }, + "403": { + "description": "Insufficient rights to a resource." + } + } + } + }, + "/profile-service/profile/roles": { + "get": { + "tags": [ + "Role" + ], + "summary": "Get user roles.", + "description": "Returns a list of user roles.", + "operationId": "GetUserRoles", + "responses": { + "200": { + "description": "Collection of roles based on selected parameters.", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetUserRolesRoleResponse" + }, + "description": "The response data for user roles." + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetUserRolesRoleResponse" + }, + "description": "The response data for user roles." + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetUserRolesRoleResponse" + }, + "description": "The response data for user roles." + } + } + } + }, + "400": { + "description": "Server will not process the request due to something that is perceived to be a client error." + }, + "401": { + "description": "No valid authentication credentials for the requested resource." + }, + "403": { + "description": "Insufficient rights to a resource." + } + } + } + }, + "/profile-service/users": { + "get": { + "tags": [ + "Users" + ], + "summary": "Get users.", + "description": "Returns a list of users based on the selected pagination and parameters.", + "operationId": "GetUsers", + "parameters": [ + { + "name": "Page", + "in": "query", + "required": true, + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer", + "description": "The page index.", + "format": "int32" + } + }, + { + "name": "Limit", + "in": "query", + "required": true, + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer", + "description": "The page limit index.", + "format": "int32" + } + }, + { + "name": "FirstName", + "in": "query", + "schema": { + "type": "string", + "description": "The first name that the user should have.", + "nullable": true + } + }, + { + "name": "LastName", + "in": "query", + "schema": { + "type": "string", + "description": "The last name that the user should have.", + "nullable": true + } + }, + { + "name": "Email", + "in": "query", + "schema": { + "type": "string", + "description": "The e-mail that the user should have.", + "nullable": true + } + }, + { + "name": "UserId", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The id that the user should have.", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Collection of users based on selected parameters.", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/GetUsersResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUsersResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUsersResponse" + } + } + } + }, + "400": { + "description": "Server will not process the request due to something that is perceived to be a client error." + }, + "401": { + "description": "No valid authentication credentials for the requested resource." + }, + "403": { + "description": "Insufficient rights to a resource." + } + } + } + } + }, + "components": { + "schemas": { + "CreateUserRequest": { + "required": [ + "email", + "firstName", + "lastName", + "roles" + ], + "type": "object", + "properties": { + "firstName": { + "maxLength": 300, + "minLength": 3, + "type": "string", + "description": "The user first name." + }, + "lastName": { + "maxLength": 300, + "minLength": 3, + "type": "string", + "description": "The user last name." + }, + "email": { + "maxLength": 600, + "minLength": 3, + "type": "string", + "description": "The user email." + }, + "roles": { + "type": "array", + "items": { + "type": "string" + }, + "description": "User roles." + }, + }, + "additionalProperties": false + }, + "GetUserRolesRoleResponse": { + "type": "object", + "properties": { + "roleId": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represent a single user role." + }, + "GetUsersResponse": { + "type": "object", + "properties": { + "currentPage": { + "type": "integer", + "description": "Currently requested resource page with number of elements specified in ItemsPerPage.", + "format": "int32", + "readOnly": true + }, + "totalPages": { + "type": "integer", + "description": "Total number of all pages possible to retrieve when dividing the total number of all resources by ItemsPerPage.", + "format": "int32", + "readOnly": true + }, + "itemsPerPage": { + "type": "integer", + "description": "How many resources should be in each page.", + "format": "int32", + "readOnly": true + }, + "totalItems": { + "type": "integer", + "description": "Total amount of available resources.", + "format": "int64", + "readOnly": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetUsersUserResponse" + }, + "description": "Resources for the CurrentPage.", + "nullable": true, + "readOnly": true + } + }, + "additionalProperties": false, + "description": "The response data for users." + }, + "GetUsersUserResponse": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "nullable": true + }, + "firstName": { + "type": "string", + "nullable": true + }, + "lastName": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represent a single user." + }, + "UserType": { + "enum": [ + "Modern", + "Legacy" + ], + "type": "string", + "description": "\n\nModern\n\nLegacy", + "x-enumNames": [ + "Modern", + "Legacy" + ] + } + } + } +} diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.2.extended.json b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.2.extended.json new file mode 100644 index 0000000..e5974d7 --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.2.extended.json @@ -0,0 +1,51672 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Camunda Platform REST API", + "description": "OpenApi Spec for Camunda Platform REST API.", + "version": "7.22.0", + "license": { + "name": "Apache License 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "externalDocs": { + "description": "Find out more about Camunda Rest API", + "url": "https://docs.camunda.org/manual/7.22/reference/rest/overview/" + }, + "servers": [ + { + "url": "http://{host}:{port}/{contextPath}", + "description": "The API server for the default process engine", + "variables": { + "host": { + "default": "localhost" + }, + "port": { + "default": "8080" + }, + "contextPath": { + "default": "engine-rest" + } + } + }, + { + "url": "http://{host}:{port}/{contextPath}/engine/{engineName}", + "description": "The API server for a named process engine", + "variables": { + "host": { + "default": "localhost" + }, + "port": { + "default": "8080" + }, + "contextPath": { + "default": "engine-rest" + }, + "engineName": { + "default": "default" + } + } + }, + { + "url": "{url}", + "description": "The API server with a custom url", + "variables": { + "url": { + "default": " " + } + } + } + ], + "tags": [ + { + "name": "Authorization" + }, + { + "name": "Batch" + }, + { + "name": "Condition" + }, + { + "name": "Decision Definition" + }, + { + "name": "Decision Requirements Definition" + }, + { + "name": "Deployment" + }, + { + "name": "Engine" + }, + { + "name": "Event Subscription" + }, + { + "name": "Execution" + }, + { + "name": "External Task" + }, + { + "name": "Filter" + }, + { + "name": "Group" + }, + { + "name": "Historic Activity Instance" + }, + { + "name": "Historic Batch" + }, + { + "name": "Historic Decision Definition" + }, + { + "name": "Historic Decision Instance" + }, + { + "name": "Historic Decision Requirements Definition" + }, + { + "name": "Historic Detail" + }, + { + "name": "Historic External Task Log" + }, + { + "name": "Historic Identity Link Log" + }, + { + "name": "Historic Incident" + }, + { + "name": "Historic Job Log" + }, + { + "name": "Historic Process Definition" + }, + { + "name": "Historic Process Instance" + }, + { + "name": "Historic Task Instance" + }, + { + "name": "Historic User Operation Log" + }, + { + "name": "Historic Variable Instance" + }, + { + "name": "History Cleanup" + }, + { + "name": "Identity" + }, + { + "name": "Incident" + }, + { + "name": "Job" + }, + { + "name": "Job Definition" + }, + { + "name": "Message" + }, + { + "name": "Metrics" + }, + { + "name": "Migration" + }, + { + "name": "Modification" + }, + { + "name": "Process Definition" + }, + { + "name": "Process Instance" + }, + { + "name": "Signal" + }, + { + "name": "Schema Log" + }, + { + "name": "Task" + }, + { + "name": "Task Attachment" + }, + { + "name": "Task Comment" + }, + { + "name": "Task Identity Link" + }, + { + "name": "Task Local Variable" + }, + { + "name": "Task Variable" + }, + { + "name": "Telemetry" + }, + { + "name": "Tenant" + }, + { + "name": "User" + }, + { + "name": "Variable Instance" + }, + { + "name": "Version" + } + ], + "paths": { + "/authorization": { + "get": { + "operationId": "queryAuthorizations", + "tags": [ + "Authorization" + ], + "summary": "Get Authorizations", + "description": "Queries for a list of authorizations using a list of parameters.\nThe size of the result set can be retrieved by using the\n[Get Authorization Count](https://docs.camunda.org/manual/7.22/reference/rest/authorization/get-query-count/) method.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the authorization." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by authorization type. (0\u003dglobal, 1\u003dgrant, 2\u003drevoke).\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#authorization-type)\nfor more information about authorization types." + }, + { + "name": "userIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of userIds." + }, + { + "name": "groupIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of groupIds." + }, + { + "name": "resourceType", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by an integer representation of the resource type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + { + "name": "resourceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by resource id." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "resourceType", + "resourceId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuthorizationDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/authorization?userIdIn\u003djonny1,jonny2`", + "value": [ + { + "id": "anAuthorizationId", + "type": 0, + "permissions": [ + "ALL" + ], + "userId": "jonny1", + "groupId": null, + "resourceType": 1, + "resourceId": "*" + }, + { + "id": "anotherAuthorizationId", + "type": 0, + "permissions": [ + "CREATE", + "READ" + ], + "userId": "jonny2", + "groupId": null, + "resourceType": 1, + "resourceId": "*", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy` is specified. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableOperationsAuthorization", + "tags": [ + "Authorization" + ], + "summary": "Authorization Resource Options", + "description": "The OPTIONS request allows you to check for the set of available operations that the currently\nauthenticated user can perform on the `/authorization` resource. Whether the user can perform an operation\nor not may depend on various factors, including the users authorizations to interact with this\nresource and the internal configuration of the process engine.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/authorization`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/authorization", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/authorization/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/authorization/create", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/authorization/check": { + "get": { + "operationId": "isUserAuthorized", + "tags": [ + "Authorization" + ], + "summary": "Perform an Authorization Check", + "description": "Performs an authorization check for the currently authenticated user.", + "parameters": [ + { + "name": "permissionName", + "in": "query", + "schema": { + "type": "string" + }, + "required": true, + "description": "String value representing the permission name to check for." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "required": true, + "description": "String value for the name of the resource to check permissions for." + }, + { + "name": "resourceType", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "required": true, + "description": "An integer representing the resource type to check permissions for.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + { + "name": "resourceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The id of the resource to check permissions for. If left blank,\na check for global permissions on the resource is performed." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The id of the user to check permissions for. The currently authenticated\nuser must have a READ permission for the Authorization resource. If `userId` is\nblank, a check for the currently authenticated user is performed." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationCheckResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/authorization/check?permissionName\u003dREAD,resourceName\u003dUSER,resourceType\u003d1,resourceId\u003djonny`", + "value": { + "permissionName": "READ", + "resourceName": "USER", + "resourceId": "jonny", + "authorized": true + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a permission\nparameterName is not valid for the provided resourceType. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The user is not authenticated. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "When a `userId` is passed and the user does not possess a READ permission for the\nAuthorization resource. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Authorization with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/authorization/count": { + "get": { + "operationId": "getAuthorizationCount", + "tags": [ + "Authorization" + ], + "summary": "Get Authorization Count", + "description": "Queries for authorizations using a list of parameters and retrieves the count.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the authorization." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by authorization type. (0\u003dglobal, 1\u003dgrant, 2\u003drevoke).\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#authorization-type)\nfor more information about authorization types." + }, + { + "name": "userIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of userIds." + }, + { + "name": "groupIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of groupIds." + }, + { + "name": "resourceType", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by an integer representation of the resource type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + { + "name": "resourceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by resource id." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/authorization/count?userIdIn\u003djonny1,jonny2`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy` is specified. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/authorization/create": { + "post": { + "operationId": "createAuthorization", + "tags": [ + "Authorization" + ], + "summary": "Create a New Authorization", + "description": "Creates a new authorization.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationCreateDto" + }, + "examples": { + "example-1": { + "summary": "POST `/authorization/create`", + "value": { + "type": 0, + "permissions": [ + "CREATE", + "READ" + ], + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/authorization/create`", + "value": { + "id": "anAuthorizationId", + "type": 0, + "permissions": [ + "CREATE", + "READ" + ], + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "links": [ + { + "method": "GET", + "href\"": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "self" + }, + { + "method": "PUT", + "href\"": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "update" + }, + { + "method": "DELETE", + "href\"": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "delete" + } + ] + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the properties in the request body are invalid, for example if\na permission parameter is not valid for the provided resourceType.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authenticated user is unauthorized to create an instance of this resource. See\nthe [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authorization could not be updated due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/authorization/{id}": { + "delete": { + "operationId": "deleteAuthorization", + "tags": [ + "Authorization" + ], + "summary": "Delete Authorization", + "description": "Deletes an authorization by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the authorization to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the authenticated user is unauthorized to delete the resource instance. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Authorization cannot be found. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getAuthorization", + "tags": [ + "Authorization" + ], + "summary": "Get Authorization", + "description": "Retrieves an authorization by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the authorization to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/authorization/anAuthorizationId`", + "value": { + "id": "anAuthorizationId", + "type": 0, + "permissions": [ + "CREATE", + "READ" + ], + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Authorization with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableOperationsAuthorizationInstance", + "tags": [ + "Authorization" + ], + "summary": "Authorization Resource Options", + "description": "The OPTIONS request allows you to check for the set of available operations that the currently\nauthenticated user can perform on a given instance of the `/authorization` resource.\nWhether the user can perform an operation or not may depend on various factors, including the users\nauthorizations to interact with this resource and the internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the authorization to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/authorization/anAuthorizationId`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "self" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "update" + }, + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/authorization/anAuthorizationId", + "rel": "delete" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + }, + "put": { + "operationId": "updateAuthorization", + "tags": [ + "Authorization" + ], + "summary": "Update an Authorization", + "description": "Updates an authorization by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the authorization to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationUpdateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/authorization/anAuthorizationId`", + "value": { + "permissions": 16, + "userId": "*", + "groupId": null, + "resourceType": 1, + "resourceId": "*" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the properties in the request body are invalid, for example if\na permission parameter is not valid for the provided resourceType.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authenticated user is unauthorized to update this resource. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authorization with the requested Id cannot be found." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authorization could not be updated due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/batch": { + "get": { + "operationId": "getBatches", + "tags": [ + "Batch" + ], + "summary": "Get List", + "description": "Queries for batches that fulfill given parameters. Parameters may be the properties of batches, such as the id or type.\nThe size of the result set can be retrieved by using the\n[Get Batch Count](https://docs.camunda.org/manual/7.22/reference/rest/batch/get-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "batchId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A batch matches if it has one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "A `Boolean` value which indicates whether only active or suspended batches should be included.\nWhen the value is set to `true`, only suspended batches will be returned and\nwhen the value is set to `false`, only active batches will be returned." + }, + { + "name": "createdBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include batches that were started by this user id." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs with failures.\nValue can only be `true`." + }, + { + "name": "withoutFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs without failures.\nValue can only be `true`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BatchDto" + } + }, + "examples": { + "example-1": { + "description": "Response for GET `/batch?type\u003daBatchType\u0026sortBy\u003dbatchId\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "aUserId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if a `sortOrder` parameter is supplied, but no `sortBy`.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/batch/count": { + "get": { + "operationId": "getBatchesCount", + "tags": [ + "Batch" + ], + "summary": "Get List Count", + "description": "Requests the number of batches that fulfill the query criteria.\nTakes the same filtering parameters as the [Get Batches](https://docs.camunda.org/manual/7.22/reference/rest/batch/get-query/) method.", + "parameters": [ + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A batch matches if it has one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "A `Boolean` value which indicates whether only active or suspended batches should be included.\nWhen the value is set to `true`, only suspended batches will be returned and\nwhen the value is set to `false`, only active batches will be returned." + }, + { + "name": "createdBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include batches that were started by this user id." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs with failures.\nValue can only be `true`." + }, + { + "name": "withoutFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs without failures.\nValue can only be `true`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/batch/count?type\u003daBatchType`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/batch/statistics": { + "get": { + "operationId": "getBatchStatistics", + "tags": [ + "Batch" + ], + "summary": "Get Statistics", + "description": "Queries for batch statistics that fulfill given parameters.\nParameters may be the properties of batches, such as the id or type.\nThe size of the result set can be retrieved by using the \n[Get Batch Statistics Count](https://docs.camunda.org/manual/7.22/reference/rest/batch/get-statistics-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "batchId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A batch matches if it has one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "A `Boolean` value which indicates whether only active or suspended batches should be included.\nWhen the value is set to `true`, only suspended batches will be returned and\nwhen the value is set to `false`, only active batches will be returned." + }, + { + "name": "createdBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include batches that were started by this user id." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs with failures.\nValue can only be `true`." + }, + { + "name": "withoutFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs without failures.\nValue can only be `true`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BatchStatisticsDto" + } + }, + "examples": { + "example-1": { + "description": "Response for GET `/batch/statistics?type\u003daBatchType\u0026sortBy\u003dbatchId\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "remainingJobs": 3, + "completedJobs": 7, + "failedJobs": 1, + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "aUserId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if a `sortOrder` parameter is supplied, but no `sortBy`.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/batch/statistics/count": { + "get": { + "operationId": "getBatchStatisticsCount", + "tags": [ + "Batch" + ], + "summary": "Get Statistics Count", + "description": "Requests the number of batch statistics that fulfill the query criteria.\nTakes the same filtering parameters as the\n[Get Batch Statistics](https://docs.camunda.org/manual/7.22/reference/rest/batch/get-statistics-query/) method.", + "parameters": [ + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A batch matches if it has one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "A `Boolean` value which indicates whether only active or suspended batches should be included.\nWhen the value is set to `true`, only suspended batches will be returned and\nwhen the value is set to `false`, only active batches will be returned." + }, + { + "name": "createdBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include batches that were started by this user id." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Only include batches that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs with failures.\nValue can only be `true`." + }, + { + "name": "withoutFailures", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches having jobs without failures.\nValue can only be `true`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/batch/count?type\u003daBatchType`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/batch/{id}": { + "delete": { + "operationId": "deleteBatch", + "tags": [ + "Batch" + ], + "summary": "Delete", + "description": "Deletes a batch by id, including all related jobs and job definitions.\nOptionally also deletes the batch history.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the batch to be deleted." + }, + { + "name": "cascade", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "`true`, if the historic batch and historic job logs for this batch should also be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Batch with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "get": { + "operationId": "getBatch", + "tags": [ + "Batch" + ], + "summary": "Get", + "description": "Retrieves a batch by id, according to the Batch interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the batch to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "description": "Response for GET `/batch/aBatchId`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "aUserId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Batch with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/batch/{id}/suspended": { + "put": { + "operationId": "updateBatchSuspensionState", + "tags": [ + "Batch" + ], + "summary": "Activate/Suspend", + "description": "Activates or suspends a batch by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the batch to activate or suspend." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/batch/aBatch/suspended`", + "value": { + "suspended": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the batch cannot be suspended or activated.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/condition": { + "post": { + "operationId": "evaluateCondition", + "tags": [ + "Condition" + ], + "summary": "Evaluate", + "description": "Triggers evaluation of conditions for conditional start event(s). \nInternally this maps to the engines condition evaluation builder method ConditionEvaluationBuilder#evaluateStartConditions(). \nFor more information see the [Conditional Start Events](https://docs.camunda.org/manual/7.22/reference/bpmn20/events/conditional-events/#conditional-start-event)\nsection of the [BPMN 2.0 Implementation Reference](https://docs.camunda.org/manual/7.22/reference/bpmn20/).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationConditionDto" + }, + "examples": { + "example-1": { + "summary": "POST /condition", + "description": "The content of the Request Body", + "value": { + "variables": { + "temperature": { + "value": 24, + "type": "Integer", + "valueInfo": { + "transient": true + } + }, + "city": { + "value": "Parma", + "type": "String" + } + }, + "businessKey": "aBusinessKey", + "tenantId": "aTenantId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [ + { + "links": [], + "id": "aProcInstId", + "definitionId": "aProcDefId", + "businessKey": "aBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": "aTenantId" + }, + { + "links": [], + "id": "anotherId", + "definitionId": "aProcDefId", + "businessKey": "aBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": "aTenantId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If both tenantId and withoutTenantId are supplied." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "If the user is not allowed to start the process instance of the process definition, which start condition was evaluated to `true`." + } + } + } + }, + "/decision-definition": { + "get": { + "operationId": "getDecisionDefinitions", + "tags": [ + "Decision Definition" + ], + "summary": "Get List", + "description": "Queries for decision definitions that fulfill given parameters.\nParameters may be the properties of decision definitions, such as the name, key or version.\nThe size of the result set can be retrieved by using\nthe [Get Decision Definition Count](https://docs.camunda.org/manual/7.22/reference/rest/decision-definition/get-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "category", + "decisionRequirementsDefinitionKey", + "key", + "id", + "name", + "version", + "deploymentId", + "deployTime", + "versionTag", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "decisionDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition id." + }, + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "deployedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the decision definition belongs to.\nOnly selects decision definitions that have been deployed after (exclusive) a specific time." + }, + { + "name": "deployedAt", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the decision definition belongs to.\nOnly selects decision definitions that have been deployed at a specific time (exact match)." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition key, i.e., the id in the DMN 1.0 XML. Exact match." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition categories that the parameter is a substring of." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by decision definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those decision definitions that are latest versions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those decision definition resources that the parameter is a substring of." + }, + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the decision requirements definition this decision definition belongs to." + }, + { + "name": "decisionRequirementsDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision requirements definition this decision definition belongs to." + }, + { + "name": "withoutDecisionRequirementsDefinition", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which does not belongs to any decision requirements definition.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A decision definition must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "includeDecisionDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include decision definitions which belong to no tenant.\nCan be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "versionTag", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag." + }, + { + "name": "versionTagLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tags of those decision definition resources that the parameter is a substring of." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DecisionDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition?key\u003ddish-decision\u0026sortBy\u003dcategory\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "dish-decision:1:c633e8a8-41b7-11e6-b0ef-00aa004d0001", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey": "dish", + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if a `sortOrder` parameter is supplied, but no `sortBy`.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/count": { + "get": { + "operationId": "getDecisionDefinitionsCount", + "tags": [ + "Decision Definition" + ], + "summary": "Get List Count", + "description": "Requests the number of decision definitions that fulfill the query criteria.\nTakes the same filtering parameters as the\n[Get Decision Definition](https://docs.camunda.org/manual/7.22/reference/rest/decision-definition/get-query/) method.", + "parameters": [ + { + "name": "decisionDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition id." + }, + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "deployedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the decision definition belongs to.\nOnly selects decision definitions that have been deployed after (exclusive) a specific time." + }, + { + "name": "deployedAt", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the decision definition belongs to.\nOnly selects decision definitions that have been deployed at a specific time (exact match)." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition key, i.e., the id in the DMN 1.0 XML. Exact match." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition categories that the parameter is a substring of." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by decision definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those decision definitions that are latest versions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those decision definition resources that the parameter is a substring of." + }, + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the decision requirements definition this decision definition belongs to." + }, + { + "name": "decisionRequirementsDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision requirements definition this decision definition belongs to." + }, + { + "name": "withoutDecisionRequirementsDefinition", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which does not belongs to any decision requirements definition.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of `Strings`. A decision definition must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which belong to no tenant.\nValue can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "includeDecisionDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include decision definitions which belong to no tenant.\nCan be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "versionTag", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag." + }, + { + "name": "versionTagLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tags of those decision definition resources that the parameter is a substring of." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/count?key\u003ddish-decision\u0026version\u003d2`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}": { + "get": { + "operationId": "getDecisionDefinitionByKey", + "tags": [ + "Decision Definition" + ], + "summary": "Get Decision Definition By Key", + "description": "Retrieves the latest version of the decision definition which belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/dish-decision`", + "value": { + "id": "aDecisionDefinitionId", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey": "dish", + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5 + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}/diagram": { + "get": { + "operationId": "getDecisionDefinitionDiagramByKey", + "tags": [ + "Decision Definition" + ], + "summary": "Get Diagram By Key", + "description": "Returns the diagram for the latest version of the decision definition which belongs to no tenant", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The decision definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/key/{key}/evaluate": { + "post": { + "operationId": "evaluateDecisionByKey", + "tags": [ + "Decision Definition" + ], + "summary": "Evaluate By Key", + "description": "Evaluates the latest version of the decision definition which belongs to no tenant.\nThe input values of the decision have to be supplied in the request body.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be evaluated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluateDecisionDto" + }, + "examples": { + "example-1": { + "summary": "POST /decision-definition/key/aKey/evaluate", + "value": { + "variables": { + "amount": { + "value": 600, + "type": "Double" + }, + "invoiceCategory": { + "value": "Misc", + "type": "String" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/decision-definition/key/aKey/evaluate`", + "value": [ + { + "result": { + "value": "management", + "type": "String", + "valueInfo": null + } + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByDecisionDefinitionKey", + "tags": [ + "Decision Definition" + ], + "summary": "Update History Time to Live By Key", + "description": "Updates the latest version of the decision definition which belongs to no tenant.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definitions to change history time to live." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/decision-definition/key/aKey/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/key/{key}/tenant-id/{tenant-id}": { + "get": { + "operationId": "getDecisionDefinitionByKeyAndTenantId", + "tags": [ + "Decision Definition" + ], + "summary": "Get Decision Definition By Key And Tenant Id", + "description": "Retrieves the latest version of the decision definition for tenant", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the decision definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/dish-decision/tenant-id/aTenantId`", + "value": { + "id": "aDecisionDefinitionId", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey": "dish", + "tenantId": "aTenantId", + "versionTag": null, + "historyTimeToLive": 5 + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}/tenant-id/{tenant-id}/diagram": { + "get": { + "operationId": "getDecisionDefinitionDiagramByKeyAndTenant", + "tags": [ + "Decision Definition" + ], + "summary": "Get Diagram By Key And Tenant", + "description": "Returns the XML of the latest version of the decision definition for tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the decision definition belongs to." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The decision definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/key/{key}/tenant-id/{tenant-id}/evaluate": { + "post": { + "operationId": "evaluateDecisionByKeyAndTenant", + "tags": [ + "Decision Definition" + ], + "summary": "Evaluate By Key And Tenant", + "description": "Evaluates the latest version of the decision definition for tenant.\nThe input values of the decision have to be supplied in the request body.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof) to be evaluated." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the decision definition belongs to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluateDecisionDto" + }, + "examples": { + "example-1": { + "summary": "POST /decision-definition/key/aKey/tenand-id/aTenantId/evaluate", + "value": { + "variables": { + "amount": { + "value": 600, + "type": "Double" + }, + "invoiceCategory": { + "value": "Misc", + "type": "String" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/decision-definition/akey/aKey/tenand-id/aTenantId/evaluate`", + "value": [ + { + "result": { + "value": "management", + "type": "String", + "valueInfo": null + } + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}/tenant-id/{tenant-id}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByDecisionDefinitionKeyAndTenant", + "tags": [ + "Decision Definition" + ], + "summary": "Update History Time to Live By Key And Tenant", + "description": "Updates the latest version of the decision definition for tenant.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).\nThe value of the update is mandatory by default and does not allow `null` values. To enable them, please\nset the feature flag `enforceHistoryTimeToLive` to `false`. Read more in [Configuration Properties]\n(https://docs.camunda.org/manual/7.22/reference/deployment-descriptors/tags/process-engine#configuration-properties)", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definitions to change history time to live." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the decision definition belongs to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/decision-definition/key/aKey/tenant-id/aTenantId/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/key/{key}/tenant-id/{tenant-id}/xml": { + "get": { + "operationId": "getDecisionDefinitionDmnXmlByKeyAndTenant", + "tags": [ + "Decision Definition" + ], + "summary": "Get XML By Key and Tenant", + "description": "Retrieves the XML of the latest version of the decision definition for tenant", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof)." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the decision definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/aKey/tenant-id/aTenantId/xml`", + "value": { + "id": "aDecisionDefinitionId", + "dmnXml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n \u003cdefinitions xmlns\u003d\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\"\n id\u003d\"definitions\"\n name\u003d\"camunda\"\n namespace\u003d\"http://camunda.org/schema/1.0/dmn\"\u003e\n \u003cdecision id\u003d\"testDecision\" name\u003d\"decision\"\u003e\n \u003cdecisionTable id\u003d\"table\"\u003e\n \u003coutput id\u003d\"result\" name\u003d\"result\" \u003e\n \u003c/output\u003e\n \u003crule id\u003d\"rule\"\u003e\n \u003coutputEntry id\u003d\"output1\"\u003e\n \u003ctext\u003e\"not okay\"\u003c/text\u003e\n \u003c/outputEntry\u003e\n \u003c/rule\u003e\n \u003c/decisionTable\u003e\n \u003c/decision\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/key/{key}/xml": { + "get": { + "operationId": "getDecisionDefinitionDmnXmlByKey", + "tags": [ + "Decision Definition" + ], + "summary": "Get XML By Key", + "description": "Retrieves the XML for the latest version of the decision definition which belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision definition (the latest version thereof)." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/key/aKey/xml`", + "value": { + "id": "aDecisionDefinitionId", + "dmnXml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n \u003cdefinitions xmlns\u003d\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\"\n id\u003d\"definitions\"\n name\u003d\"camunda\"\n namespace\u003d\"http://camunda.org/schema/1.0/dmn\"\u003e\n \u003cdecision id\u003d\"testDecision\" name\u003d\"decision\"\u003e\n \u003cdecisionTable id\u003d\"table\"\u003e\n \u003coutput id\u003d\"result\" name\u003d\"result\" \u003e\n \u003c/output\u003e\n \u003crule id\u003d\"rule\"\u003e\n \u003coutputEntry id\u003d\"output1\"\u003e\n \u003ctext\u003e\"not okay\"\u003c/text\u003e\n \u003c/outputEntry\u003e\n \u003c/rule\u003e\n \u003c/decisionTable\u003e\n \u003c/decision\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/{id}": { + "get": { + "operationId": "getDecisionDefinitionById", + "tags": [ + "Decision Definition" + ], + "summary": "Get Decision Definition By Id", + "description": "Retrieves a decision definition by id, according to the `DecisionDefinition` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision definition to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/aDecisionDefinitionId`", + "value": { + "id": "aDecisionDefinitionId", + "key": "dish-decision", + "category": "http://camunda.org/schema/1.0/dmn", + "name": "Dish Decision", + "version": 1, + "resource": "drd-dish-decision.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionId": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "decisionRequirementsDefinitionKey": "dish", + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5 + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/{id}/diagram": { + "get": { + "operationId": "getDecisionDefinitionDiagram", + "tags": [ + "Decision Definition" + ], + "summary": "Get Diagram", + "description": "Retrieves the diagram of a decision definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The decision definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/{id}/evaluate": { + "post": { + "operationId": "evaluateDecisionById", + "tags": [ + "Decision Definition" + ], + "summary": "Evaluate By Id", + "description": "Evaluates a given decision and returns the result.\nThe input values of the decision have to be supplied in the request body.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision definition to be evaluated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluateDecisionDto" + }, + "examples": { + "example-1": { + "summary": "POST /decision-definition/aDecisionDefinitionId/evaluate", + "value": { + "variables": { + "amount": { + "value": 600, + "type": "Double" + }, + "invoiceCategory": { + "value": "Misc", + "type": "String" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/decision-definition/aDecisionDefinitionId/evaluate`", + "value": [ + { + "result": { + "value": "management", + "type": "String", + "valueInfo": null + } + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-definition/{id}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByDecisionDefinitionId", + "tags": [ + "Decision Definition" + ], + "summary": "Update History Time to Live", + "description": "Updates history time to live for decision definition.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision definition to change history time to live." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/decision-definition/aDecisionDefinitionId/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-definition/{id}/xml": { + "get": { + "operationId": "getDecisionDefinitionDmnXmlById", + "tags": [ + "Decision Definition" + ], + "summary": "Get XML By Id", + "description": "Retrieves the DMN XML of a decision definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/decision-definition/aDecisionDefinitionId/xml`", + "value": { + "id": "aDecisionDefinitionId", + "dmnXml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n \u003cdefinitions xmlns\u003d\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\"\n id\u003d\"definitions\"\n name\u003d\"camunda\"\n namespace\u003d\"http://camunda.org/schema/1.0/dmn\"\u003e\n \u003cdecision id\u003d\"testDecision\" name\u003d\"decision\"\u003e\n \u003cdecisionTable id\u003d\"table\"\u003e\n \u003coutput id\u003d\"result\" name\u003d\"result\" \u003e\n \u003c/output\u003e\n \u003crule id\u003d\"rule\"\u003e\n \u003coutputEntry id\u003d\"output1\"\u003e\n \u003ctext\u003e\"not okay\"\u003c/text\u003e\n \u003c/outputEntry\u003e\n \u003c/rule\u003e\n \u003c/decisionTable\u003e\n \u003c/decision\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision definition with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/decision-requirements-definition": { + "get": { + "operationId": "getDecisionRequirementsDefinitions", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Definitions", + "description": "Queries for decision requirements definitions that fulfill given parameters.\nParameters may be the properties of decision requirements definitions, such as the name,\nkey or version. The size of the result set can be retrieved by using the\n[Get Decision Requirements Definition Count](https://docs.camunda.org/manual/7.22/reference/rest/decision-requirements-definition/get-query-count/)\nmethod.", + "parameters": [ + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition id." + }, + { + "name": "decisionRequirementsDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the deployment a decision requirement definition belongs to." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition key, i.e., the id in the DMN 1.3 XML. Exact\nmatch." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition categories that the parameter is a substring\nof." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by decision requirements definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those decision requirements definitions that are latest versions. Value may\nonly be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision requirements definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those decision requirements definition resources that the parameter is\na substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A decision requirements definition must\nhave one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision requirements definitions which belong to no tenant. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "includeDecisionRequirementsDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include decision requirements definitions which belong to no tenant. Can be used in\ncombination with `tenantIdIn`. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "id", + "key", + "name", + "version", + "deploymentId", + "category", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition?key\u003ddish\u0026sortBy\u003dversion\u0026sortOrder\u003dasc`", + "description": "GET `/decision-requirements-definition?key\u003ddish\u0026sortBy\u003dversion\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001", + "key": "dish", + "category": "drd-test", + "name": "Dish", + "version": 1, + "resource": "dish.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if\na `sortOrder` parameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/count": { + "get": { + "operationId": "getDecisionRequirementsDefinitionsCount", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Definition Count", + "description": "Requests the number of decision requirements definitions that fulfill the query\ncriteria.\nTakes the same filtering parameters as the\n[Get Decision Requirements Definitions](https://docs.camunda.org/manual/7.22/reference/rest/decision-requirements-definition/get-query/)\nmethod.", + "parameters": [ + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition id." + }, + { + "name": "decisionRequirementsDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the deployment a decision requirement definition belongs to." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition key, i.e., the id in the DMN 1.3 XML. Exact\nmatch." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision requirements definition categories that the parameter is a substring\nof." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by decision requirements definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those decision requirements definitions that are latest versions. Value may\nonly be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision requirements definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those decision requirements definition resources that the parameter is\na substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A decision requirements definition must\nhave one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision requirements definitions which belong to no tenant. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "includeDecisionRequirementsDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include decision requirements definitions which belong to no tenant. Can be used in\ncombination with `tenantIdIn`. Value may only be `true`, as `false` is the\ndefault behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/count?key\u003ddish`", + "description": "GET `/decision-requirements-definition/count?key\u003ddish`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if\na `sortOrder` parameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/key/{key}": { + "get": { + "operationId": "getDecisionRequirementsDefinitionByKey", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Definition by Key", + "description": "Retrieves a decision requirements definition according to the\n`DecisionRequirementsDefinition` interface in the engine. \nReturns the latest version of the decision requirements definition \nwhich belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey`", + "description": "GET `/decision-requirements-definition/key/invoiceKey`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "key": "invoiceKey", + "category": "invoice", + "name": "receiptInvoice", + "version": 2, + "resource": "invoice.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/key/{key}/diagram": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDiagramByKey", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Diagram by Key", + "description": "Retrieves the diagram of a decision requirements definition.\nReturns the diagram for the latest version of the decision requirements \ndefinition which belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be\nretrieved." + } + ], + "responses": { + "200": { + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `image/*` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "value": "" + } + } + }, + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/octet-stream` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/diagram`", + "value": "" + } + } + } + }, + "description": "The image diagram of the decision requirements definition." + }, + "204": { + "description": "The decision requirements definition doesn\u0027t have an associated diagram. This\nmethod returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}": { + "get": { + "operationId": "getDecisionRequirementsDefinitionByKeyAndTenantId", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Definition by Key and Tenant ID", + "description": "Retrieves a decision requirements definition according to the\n`DecisionRequirementsDefinition` interface in the engine.\nReturns the latest version of the decision requirements definition \nfor a tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant to which the decision requirements definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey`/tenant-id/tenantA", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "key": "invoiceKey", + "category": "invoice", + "name": "receiptInvoice", + "version": 2, + "resource": "invoice.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": "tenantA" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/diagram": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDiagramByKeyAndTenantId", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Diagram by Key and Tenant ID", + "description": "Retrieves the diagram of a decision requirements definition.\nReturns the diagram of the latest version of the decision requirements \ndefinition for a tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be\nretrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant to which the decision requirements definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `image/*` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "value": "" + } + } + }, + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/octet-stream` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/diagram`", + "value": "" + } + } + } + }, + "description": "The image diagram of the decision requirements definition." + }, + "204": { + "description": "The decision requirements definition doesn\u0027t have an associated diagram. This\nmethod returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/key/{key}/tenant-id/{tenant-id}/xml": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDmnXmlByKeyAndTenantId", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get DMN XML by Key and Tenant ID", + "description": "Retrieves the DMN XML of a decision requirements definition.\nReturns the XML of the latest version of the decision requirements \ndefinition for a tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be\nretrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant to which the decision requirements definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionXmlDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/xml`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/tenant-id/tenantA/xml`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "dmnXml": "\u003c?xml version\u003d\"1.1\" encoding\u003d\"UTF-8\"?\u003e...\u003cdefinitions id\u003d\"dish\" name\u003d\"Dish\" namespace\u003d\"test-drg\" ... /\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nDecision requirements definition with given id or key does not\nexist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/decision-requirements-definition/key/{key}/xml": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDmnXmlByKey", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get DMN XML by Key", + "description": "Retrieves the DMN XML of a decision requirements definition.\nReturns the XML for the latest version of the decision requirements \ndefinition which belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the decision requirements definition (the latest version thereof) to be\nretrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionXmlDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/key/invoiceKey/xml`", + "description": "GET `/decision-requirements-definition/key/invoiceKey/xml`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "dmnXml": "\u003c?xml version\u003d\"1.1\" encoding\u003d\"UTF-8\"?\u003e...\u003cdefinitions id\u003d\"dish\" name\u003d\"Dish\" namespace\u003d\"test-drg\" ... /\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nDecision requirements definition with given id or key does not\nexist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/decision-requirements-definition/{id}": { + "get": { + "operationId": "getDecisionRequirementsDefinitionById", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Definition by ID", + "description": "Retrieves a decision requirements definition according to the\n`DecisionRequirementsDefinition` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision requirements definition to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "key": "invoiceKey", + "category": "invoice", + "name": "receiptInvoice", + "version": 2, + "resource": "invoice.dmn", + "deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001", + "tenantId": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/{id}/diagram": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDiagramById", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get Decision Requirements Diagram by ID", + "description": "Retrieves the diagram of a decision requirements definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision requirements definition." + } + ], + "responses": { + "200": { + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `image/*` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "value": "" + } + } + }, + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/octet-stream` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/diagram`", + "value": "" + } + } + } + }, + "description": "The image diagram of the decision requirements definition." + }, + "204": { + "description": "The decision requirements definition doesn\u0027t have an associated diagram. This\nmethod returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/decision-requirements-definition/{id}/xml": { + "get": { + "operationId": "getDecisionRequirementsDefinitionDmnXmlById", + "tags": [ + "Decision Requirements Definition" + ], + "summary": "Get DMN XML by ID", + "description": "Retrieves the DMN XML of a decision requirements definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision requirements definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionXmlDto" + }, + "examples": { + "example-1": { + "summary": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/xml`", + "description": "GET `/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/xml`", + "value": { + "id": "invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c", + "dmnXml": "\u003c?xml version\u003d\"1.1\" encoding\u003d\"UTF-8\"?\u003e...\u003cdefinitions id\u003d\"dish\" name\u003d\"Dish\" namespace\u003d\"test-drg\" ... /\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Decision requirements definition with given id or key does not\nexist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment": { + "get": { + "operationId": "getDeployments", + "tags": [ + "Deployment" + ], + "summary": "Get List", + "description": "Queries for deployments that fulfill given parameters. Parameters may be the properties of deployments,\nsuch as the id or name or a range of the deployment time. The size of the result set can be retrieved by\nusing the [Get Deployment count](https://docs.camunda.org/manual/7.22/reference/rest/deployment/get-query-count/) method.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id" + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment name. Exact match." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment name that the parameter is a substring of. The parameter can include the\nwildcard `%` to express like-strategy such as: starts with (`%`name), ends with (name`%`) or contains\n(`%`name`%`)." + }, + { + "name": "source", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment source." + }, + { + "name": "withoutSource", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Filter by the deployment source whereby source is equal to `null`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A deployment must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include deployments which belong to no tenant. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "includeDeploymentsWithoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Include deployments which belong to no tenant. Can be used in combination with `tenantIdIn`. Value may\nonly be `true`, as `false` is the default behavior." + }, + { + "name": "after", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to all deployments after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "before", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to all deployments before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "id", + "name", + "deploymentTime", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeploymentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/deployment?name\u003ddeploymentName`", + "value": [ + { + "id": "someId", + "name": "deploymentName", + "source": "process application", + "tenantId": null, + "deploymentTime": "2013-04-23T13:42:43.000+0200" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`, or if an invalid operator for variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/count": { + "get": { + "operationId": "getDeploymentsCount", + "tags": [ + "Deployment" + ], + "summary": "Get List Count", + "description": "Queries for the number of deployments that fulfill given parameters. Takes the same parameters as the\n[Get Deployments](https://docs.camunda.org/manual/7.22/reference/rest/deployment/get-query/) method.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id" + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment name. Exact match." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment name that the parameter is a substring of. The parameter can include the\nwildcard `%` to express like-strategy such as: starts with (`%`name), ends with (name`%`) or contains\n(`%`name`%`)." + }, + { + "name": "source", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment source." + }, + { + "name": "withoutSource", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Filter by the deployment source whereby source is equal to `null`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A deployment must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include deployments which belong to no tenant. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "includeDeploymentsWithoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Include deployments which belong to no tenant. Can be used in combination with `tenantIdIn`. Value may\nonly be `true`, as `false` is the default behavior." + }, + { + "name": "after", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to all deployments after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "before", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to all deployments before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/deployment/count?name\u003ddeploymentName`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example, if an invalid operator for variable\ncomparison is used. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/create": { + "post": { + "operationId": "createDeployment", + "tags": [ + "Deployment" + ], + "summary": "Create", + "description": "Creates a deployment.\n\n**Security Consideration**\n\nDeployments can contain custom code in form of scripts or EL expressions to customize process behavior.\nThis may be abused for remote execution of arbitrary code.", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormDeploymentDto" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentWithDefinitionsDto" + }, + "examples": { + "example-1": { + "summary": "POST `/deployment/create`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/deployment/aDeploymentId", + "rel": "self" + } + ], + "id": "aDeploymentId", + "name": "aName", + "source": "process application", + "deploymentTime": "2013-01-23T13:59:43.000+0200", + "tenantId": null, + "deployedProcessDefinitions": { + "aProcDefId": { + "id": "aProcDefId", + "key": "aKey", + "category": "aCategory", + "description": "aDescription", + "name": "aName", + "version": 42, + "resource": "aResourceName", + "deploymentId": "aDeploymentId", + "diagram": "aResourceName.png", + "suspended": true, + "tenantId": null, + "versionTag": null + } + }, + "deployedCaseDefinitions": null, + "deployedDecisionDefinitions": null, + "deployedDecisionRequirementsDefinitions": null + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ParseExceptionDto" + }, + "examples": { + "example-1": { + "summary": "GET /deployment?name\u003ddeploymentName", + "value": { + "type": "ParseException", + "message": "ENGINE-09005 Could not parse BPMN process. Errors: Exclusive Gateway \u0027ExclusiveGateway_1\u0027 has outgoing sequence flow \u0027SequenceFlow_0\u0027 without condition which is not the default flow.", + "details": { + "invoice.bpmn": { + "errors": [ + { + "message": "Exclusive Gateway \u0027ExclusiveGateway_1\u0027 has outgoing sequence flow \u0027SequenceFlow_0\u0027 without condition which is not the default flow.", + "line": 77, + "column": 15, + "mainBpmnElementId": "ExclusiveGateway_1", + "bpmnElementIds": [ + "ExclusiveGateway_1", + "SequenceFlow_0" + ] + } + ], + "warnings": [ + { + "message": "It is not recommended to use a cancelling boundary timer event with a time cycle.", + "line": 87, + "column": 20, + "mainBpmnElementId": "BoundaryEvent_1", + "bpmnElementIds": [ + "BoundaryEvent_1" + ] + } + ] + } + } + } + } + } + } + }, + "description": "Bad Request. In case one of the bpmn resources cannot be parsed.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#parse-exceptions) for\nthe error response format." + } + } + } + }, + "/deployment/registered": { + "get": { + "operationId": "getRegisteredDeployments", + "tags": [ + "Deployment" + ], + "summary": "Get Registered Deployments", + "description": "Queries the registered deployment IDs for the current application.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [ + "deploymentId1", + "deploymentId2", + "deploymentId3" + ] + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/deployment/{id}": { + "delete": { + "operationId": "deleteDeployment", + "tags": [ + "Deployment" + ], + "summary": "Delete", + "description": "Deletes a deployment by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment to be deleted." + }, + { + "name": "cascade", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if all process instances, historic process instances and jobs for this deployment\nshould be deleted." + }, + { + "name": "skipCustomListeners", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if only the built-in ExecutionListeners should be notified with the end event." + }, + { + "name": "skipIoMappings", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if all input/output mappings should not be invoked." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "A Deployment with the provided id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getDeployment", + "tags": [ + "Deployment" + ], + "summary": "Get", + "description": "Retrieves a deployment by id, according to the `Deployment` interface of the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentDto" + }, + "examples": { + "example-1": { + "summary": "GET `/deployments/someDeploymentId`", + "value": { + "id": "someDeploymentId", + "name": "deploymentName", + "source": "process application", + "deploymentTime": "2013-04-23T13:42:43.000+0200" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Deployment with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/{id}/redeploy": { + "post": { + "operationId": "redeploy", + "tags": [ + "Deployment" + ], + "summary": "Redeploy", + "description": "Re-deploys an existing deployment.\n\nThe deployment resources to re-deploy can be restricted by using the properties `resourceIds` or\n`resourceNames`. If no deployment resources to re-deploy are passed then all existing resources of the\ngiven deployment are re-deployed.\n\n**Warning**: Deployments can contain custom code in form of scripts or EL expressions to customize\nprocess behavior. This may be abused for remote execution of arbitrary code. See the section on\n[security considerations for custom code](https://docs.camunda.org/manual/7.22/user-guide/process-engine/securing-custom-code/) in\nthe user guide for details.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment to re-deploy." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RedeploymentDto" + }, + "examples": { + "example-1": { + "summary": "POST `/deployment/anDeploymentId/redeploy`", + "value": { + "resourceIds": [ + "aResourceId" + ], + "resourceNames": [ + "aResourceName" + ], + "source": "cockpit" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentWithDefinitionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/deployment/aDeploymentId", + "rel": "self" + } + ], + "id": "aDeploymentId", + "name": "aName", + "source": "cockpit", + "deploymentTime": "2015-10-13T13:59:43.000+0200", + "tenantId": null, + "deployedProcessDefinitions": { + "aProcDefId": { + "id": "aProcDefId", + "key": "aKey", + "category": "aCategory", + "description": "aDescription", + "name": "aName", + "version": 42, + "resource": "aResourceName", + "deploymentId": "aDeploymentId", + "diagram": "aResourceName.png", + "suspended": true, + "tenantId": null, + "versionTag": null + } + }, + "deployedCaseDefinitions": null, + "deployedDecisionDefinitions": null, + "deployedDecisionRequirementsDefinitions": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Deployment or a deployment resource for the given deployment does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/{id}/resources": { + "get": { + "operationId": "getDeploymentResources", + "tags": [ + "Deployment" + ], + "summary": "Get Resources", + "description": "Retrieves all deployment resources of a given deployment.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment to retrieve the deployment resources for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeploymentResourceDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/deployment/anDeploymentId/resources`", + "value": [ + { + "id": "anResourceId", + "name": "anResourceName", + "deploymentId": "anDeploymentId" + }, + { + "id": "anotherResourceId", + "name": "anotherResourceName", + "deploymentId": "anDeploymentId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Deployment resources for the given deployment do not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/{id}/resources/{resourceId}": { + "get": { + "operationId": "getDeploymentResource", + "tags": [ + "Deployment" + ], + "summary": "Get Resource", + "description": "Retrieves a deployment resource by resource id for the given deployment.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment" + }, + { + "name": "resourceId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment resource" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeploymentResourceDto" + }, + "examples": { + "example-1": { + "summary": "GET `/deployments/someDeploymentId/resources/someResourceId`", + "value": { + "id": "someResourceId", + "name": "someResourceName", + "deploymentId": "someDeploymentId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Deployment Resource with given resource id or deployment id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/deployment/{id}/resources/{resourceId}/data": { + "get": { + "operationId": "getDeploymentResourceData", + "tags": [ + "Deployment" + ], + "summary": "Get Resource (Binary)", + "description": "Retrieves the binary content of a deployment resource for the given deployment by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment." + }, + { + "name": "resourceId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the deployment resource." + } + ], + "responses": { + "200": { + "description": "Request successful. The media type of the response depends on the filename.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For files without any MIME type information, a byte stream is returned." + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information are returned as the saved type. For example, a\n `process.bpmn` resource will have the media type `application/xml`." + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Deployment Resource with given resource id or deployment id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/engine": { + "get": { + "operationId": "getProcessEngineNames", + "tags": [ + "Engine" + ], + "summary": "Get List", + "description": "Retrieves the names of all process engines available on your platform.\n**Note**: You cannot prepend `/engine/{name}` to this method.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessEngineDto" + } + }, + "examples": { + "example-1": { + "value": [ + { + "name": "default" + }, + { + "name": "anotherEngineName" + } + ] + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/event-subscription": { + "get": { + "operationId": "getEventSubscriptions", + "tags": [ + "Event Subscription" + ], + "summary": "Get List", + "description": "Queries for event subscriptions that fulfill given parameters.\nThe size of the result set can be retrieved by using the\n[Get Event Subscriptions count](https://docs.camunda.org/manual/7.22/reference/rest/event-subscription/get-query-count/) method.", + "parameters": [ + { + "name": "eventSubscriptionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscription with the given id." + }, + { + "name": "eventName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions for events with the given name." + }, + { + "name": "eventType", + "in": "query", + "schema": { + "enum": [ + "message", + "signal", + "compensate", + "conditional" + ], + "type": "string" + }, + "description": "Only select subscriptions for events with the given type.\nValid values: `message`, `signal`, `compensate` and `conditional`." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to an execution with the given id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to a process instance with the given id." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to an activity with the given id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nOnly select subscriptions that belong to one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select subscriptions which have no tenant id.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "includeEventSubscriptionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Select event subscriptions which have no tenant id.\nCan be used in combination with tenantIdIn parameter.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "created", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventSubscriptionDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/event-subscription?eventType\u003dmessage\u0026sortBy\u003dcreated\u0026sortOrder\u003ddesc`", + "value": [ + { + "id": "anId", + "eventType": "message", + "eventName": "anEventName", + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "activityId": "anActivityId", + "createdDate": "2020-04-20T15:23:12.229+0200", + "tenantId": null + }, + { + "id": "anotherId", + "eventType": "message", + "eventName": "anotherEventName", + "executionId": "anotherExecutionId", + "processInstanceId": "anotherProcessInstanceId", + "activityId": "anotherActivityId", + "createdDate": "2020-04-20T15:20:12.229+0200", + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid,\nfor example if a `sortOrder` parameter is supplied, but no `sortBy`.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/event-subscription/count": { + "get": { + "operationId": "getEventSubscriptionsCount", + "tags": [ + "Event Subscription" + ], + "summary": "Get List Count", + "description": "Queries for the number of event subscriptions that fulfill given parameters.\nTakes the same parameters as the\n[Get Event Subscriptions](https://docs.camunda.org/manual/7.22/reference/rest/event-subscription/get-query/) method.", + "parameters": [ + { + "name": "eventSubscriptionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscription with the given id." + }, + { + "name": "eventName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions for events with the given name." + }, + { + "name": "eventType", + "in": "query", + "schema": { + "enum": [ + "message", + "signal", + "compensate", + "conditional" + ], + "type": "string" + }, + "description": "Only select subscriptions for events with the given type.\nValid values: `message`, `signal`, `compensate` and `conditional`." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to an execution with the given id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to a process instance with the given id." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select subscriptions that belong to an activity with the given id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nOnly select subscriptions that belong to one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select subscriptions which have no tenant id.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "includeEventSubscriptionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Select event subscriptions which have no tenant id.\nCan be used in combination with tenantIdIn parameter.\nValue may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/event-subscription/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution": { + "get": { + "operationId": "getExecutions", + "tags": [ + "Execution" + ], + "summary": "Get Executions", + "description": "Queries for the executions that fulfill given parameters.\nParameters may be static as well as dynamic runtime properties of\nexecutions.\nThe size of the result set can be retrieved by using the [Get\nExecution Count](https://docs.camunda.org/manual/7.22/reference/rest/execution/get-query-count/)\nmethod.", + "parameters": [ + { + "name": "businessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the business key of the process instances the executions belong to." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the executions run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the executions run on." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process instance the execution belongs to." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the activity the execution currently executes." + }, + { + "name": "signalEventSubscriptionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only those executions that expect a signal of the given name." + }, + { + "name": "messageEventSubscriptionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only those executions that expect a message of the given name." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type. See the [User Guide](/manual/develop/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. An execution must have one of the given\ntenant ids." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include executions that have variables with certain values.\nVariable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` -\ngreater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or\nequal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include executions that belong to a process instance with variables with certain\nvalues.\nVariable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "instanceId", + "definitionKey", + "definitionId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExecutionDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/execution?variables\u003dmyVariable_eq_camunda`", + "value": [ + { + "id": "anId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryExecutions", + "tags": [ + "Execution" + ], + "summary": "Get Executions (POST)", + "description": "Queries for executions that fulfill given parameters through a JSON object.\nThis method is slightly more powerful than the [Get\nExecutions](https://docs.camunda.org/manual/7.22/reference/rest/execution/get-query/) method\nbecause it allows\nto filter by multiple instance and execution variables of types\n`String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution`", + "value": { + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId", + "sorting": [ + { + "sortBy": "definitionKey", + "sortOrder": "asc" + }, + { + "sortBy": "instanceId", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExecutionDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/execution`", + "value": [ + { + "id": "anId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/count": { + "get": { + "operationId": "getExecutionsCount", + "tags": [ + "Execution" + ], + "summary": "Get Execution Count", + "description": "Queries for the number of executions that fulfill given parameters.\nTakes the same parameters as the [Get\nExecutions](https://docs.camunda.org/manual/7.22/reference/rest/execution/get-query/) method.", + "parameters": [ + { + "name": "businessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the business key of the process instances the executions belong to." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the executions run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the executions run on." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process instance the execution belongs to." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the activity the execution currently executes." + }, + { + "name": "signalEventSubscriptionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only those executions that expect a signal of the given name." + }, + { + "name": "messageEventSubscriptionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only those executions that expect a message of the given name." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type. See the [User Guide](/manual/develop/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. An execution must have one of the given\ntenant ids." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include executions that have variables with certain values.\nVariable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` -\ngreater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or\nequal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include executions that belong to a process instance with variables with certain\nvalues.\nVariable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "GET `/execution/count?variables\u003dmyVariable_eq_camunda`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryExecutionsCount", + "tags": [ + "Execution" + ], + "summary": "Get Execution Count (POST)", + "description": "Queries for the number of executions that fulfill given parameters. This method\ntakes the same message body as the [Get Executions\nPOST](https://docs.camunda.org/manual/7.22/reference/rest/execution/post-query/) method and\ntherefore it is slightly more powerful than the [Get Execution\nCount](https://docs.camunda.org/manual/7.22/reference/rest/execution/get-query-count/) method.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution/count`", + "value": { + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "POST `/execution/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/{id}": { + "get": { + "operationId": "getExecution", + "tags": [ + "Execution" + ], + "summary": "Get Execution", + "description": "Retrieves an execution by id, according to the `Execution` interface in the\nengine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionDto" + }, + "examples": { + "example-1": { + "description": "GET `/execution/anExecutionId`", + "value": { + "id": "anExecutionId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Execution with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/{id}/create-incident": { + "post": { + "operationId": "createIncident", + "tags": [ + "Execution" + ], + "summary": "Create Incident", + "description": "Creates a custom incident with given properties.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to create a new incident for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIncidentDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution/anExecutionId/create-incident`", + "value": { + "incidentType": "aType", + "configuration": "aConfiguration" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IncidentDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/execution/anExecutionId/create-incident`", + "value": { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "incidentTimestamp": "2014-03-01T08:00:00.000+0200", + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "tenantId": null, + "incidentMessage": "anIncidentMessage", + "jobDefinitionId": "aJobDefinitionId" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the incident type is null, the execution does not exist or the\nexecution is not related to any activity." + } + } + } + }, + "/execution/{id}/localVariables": { + "get": { + "operationId": "getLocalExecutionVariables", + "tags": [ + "Execution" + ], + "summary": "Get Local Execution Variables", + "description": "Retrieves all variables of a given execution by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to retrieve the variables from." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically\nvariables that store custom Java objects) should be deserialized\non server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on\nserver side and transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean\nproperty introspection feature. Note that this requires the Java\nclasses of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its\nserialized format. For example, a variable that is serialized as\nXML will be returned as a JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of\nbackward compatibility, we recommend setting this parameter to\n`false` when developing web applications that are independent of\nthe Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/execution/anExecutionId/localVariables`", + "description": "GET `/execution/anExecutionId/localVariables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }, + "example-2": { + "summary": "GET `/execution/anExecutionId/localVariables?deserializeValues\u003dfalse`", + "description": "GET `/execution/anExecutionId/localVariables?deserializeValues\u003dfalse`", + "value": { + "aVariableKey": { + "value": "\u003cmyObj\u003e\u003cprop1\u003ea\u003c/prop1\u003e\u003cprop2\u003eb\u003c/prop2\u003e\u003c/myObj\u003e", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "description": "Request successful. Returns A JSON object of variables key-value pairs. Each key is a variable name and each value a VariableValueDto" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Execution with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "modifyLocalExecutionVariables", + "tags": [ + "Execution" + ], + "summary": "Update/Delete Local Execution Variables", + "description": "Updates or deletes the variables in the context of an execution by id. The updates\ndo not propagate upwards in the execution hierarchy.\nUpdates precede deletions. So, if a variable is updated AND deleted,\nthe deletion overrides the update.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to set variables for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchVariablesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution/anExecutionId/localVariables`", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Update or delete could not be executed, for example because the execution does not\nexist." + } + } + } + }, + "/execution/{id}/localVariables/{varName}": { + "delete": { + "operationId": "deleteLocalExecutionVariable", + "tags": [ + "Execution" + ], + "summary": "Delete Local Execution Variable", + "description": "Deletes a variable in the context of a given execution by id. Deletion does not\npropagate upwards in the execution hierarchy.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to delete the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to delete." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + } + } + }, + "get": { + "operationId": "getLocalExecutionVariable", + "tags": [ + "Execution" + ], + "summary": "Get Local Execution Variable", + "description": "Retrieves a variable from the context of a given execution by id. Does not traverse\nthe parent execution hierarchy.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to retrieve the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to get." + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically\nvariables that store custom Java objects) should be deserialized\non server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on\nserver side and transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean\nproperty introspection feature. Note that this requires the Java\nclasses of the variable value to be on the REST API\u0027s classpath.\nIf set to `false`, a serializable variable will be returned in its\nserialized format. For example, a variable that is serialized as\nXML will be returned as a JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of\nbackward compatibility, we recommend setting this parameter to\n`false` when developing web applications that are independent of\nthe Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "GET `/execution/anExecutionId/localVariables/aVarName`", + "description": "GET `/execution/anExecutionId/localVariables/aVarName`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }, + "example-2": { + "summary": "GET `/execution/anExecutionId/localVariables/aVarName?deserializeValue\u003dfalse`", + "description": "GET `/execution/anExecutionId/localVariables/aVarName?deserializeValue\u003dfalse`", + "value": { + "value": "\u003cmyobj\u003e\u003cprop1\u003ea\u003c/prop1\u003e\u003cprop2\u003eb\u003c/prop2\u003e\u003c/myobj\u003e", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "putLocalExecutionVariable", + "tags": [ + "Execution" + ], + "summary": "Put Local Execution Variable", + "description": "Sets a variable in the context of a given execution by id. Update does not\npropagate upwards in the execution hierarchy.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to set the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to set." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/execution/anExecutionId/localVariables/aVarName`", + "value": { + "value": "someValue", + "type": "String" + } + }, + "example-2": { + "summary": "PUT `/execution/anExecutionId/localVariables/aVarName`", + "value": { + "value": "\u003cmyobj\u003e\u003cprop1\u003ea\u003c/prop1\u003e\u003cprop2\u003eb\u003c/prop2\u003e\u003c/myobj\u003e", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/execution/{id}/localVariables/{varName}/data": { + "get": { + "operationId": "getLocalExecutionVariableBinary", + "tags": [ + "Execution" + ], + "summary": "Get Local Execution Variable (Binary)", + "description": "Retrieves a binary variable from the context of a given execution by id. Does not\ntraverse the parent execution hierarchy. Applicable for byte array and\nfile variables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to retrieve the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to get." + } + ], + "responses": { + "200": { + "description": "Request successful.\n For binary variables or files without any MIME type information, a byte stream is returned.\n File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "binary variable: Status 200", + "value": "Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "file variable: Status 200", + "value": "Content-Type: text/plain; charset\u003dUTF-8. Content-Disposition: attachment; filename\u003d\"someFile.txt\"" + } + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable instance with given id exists but is not a binary variable. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable instance with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "setLocalExecutionVariableBinary", + "tags": [ + "Execution" + ], + "summary": "Post Local Execution Variable (Binary)", + "description": "Sets the serialized value for a binary variable or the binary value for a file\nvariable in the context of a given execution by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to set the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to set." + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormVariableBinaryDto" + }, + "examples": { + "example-1": { + "summary": "Post binary content of a byte array variable", + "description": "POST /execution/anExecutionId/localVariables/aVarName/data", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"unspecified\"\n Content-Type: application/octet-stream\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n Bytes\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y--\n ```\n " + }, + "example-2": { + "summary": "Post the JSON serialization of a Java Class **(deprecated)**", + "description": "POST /execution/anExecutionId/localVariables/aVarName/data", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"\n Content-Type: application/json; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n [\"foo\", \"bar\"]\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"type\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n java.util.ArrayList\u003cjava.lang.Object\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y--\n ```\n " + }, + "example-3": { + "summary": "Post a text file", + "description": "POST /execution/anExecutionId/localVariables/aVarName/data", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"myFile.txt\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n File\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y--\n ```\n " + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if no filename is set. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/{id}/messageSubscriptions/{messageName}": { + "get": { + "operationId": "getMessageEventSubscription", + "tags": [ + "Execution" + ], + "summary": "Get Message Event Subscription", + "description": "Retrieves a message event subscription for a given execution by id and a message\nname.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution that holds the subscription." + }, + { + "name": "messageName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the message that the subscription corresponds to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventSubscriptionDto" + }, + "examples": { + "example-1": { + "description": "GET `/execution/anExecutionId/messageSubscriptions/someMessage`", + "value": { + "id": "anEventSubscriptionId", + "eventType": "message", + "eventName": "anEvent", + "executionId": "anExecutionId", + "processInstanceId": "aProcInstId", + "activityId": "anActivity", + "tenantId": null, + "createdDate": "2013-01-23T13:59:43.000+0200" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "A message subscription for the given name and execution does not exist.\nThis may either mean that the execution does not exist, or that\nit is not subscribed on such a message.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/{id}/messageSubscriptions/{messageName}/trigger": { + "post": { + "operationId": "triggerEvent", + "tags": [ + "Execution" + ], + "summary": "Trigger Message Event Subscription", + "description": "Delivers a message to a specific execution by id, to trigger an existing message\nevent subscription. Inject process variables as the message\u0027s\npayload.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to submit the message to." + }, + { + "name": "messageName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the message that the addressed subscription corresponds to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionTriggerDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution/anExecutionId/messageSubscriptions/someMessage/trigger`", + "value": { + "variables": { + "aVariable": { + "value": true, + "type": "Boolean" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The addressed execution has no pending message subscriptions for the given message.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/execution/{id}/signal": { + "post": { + "operationId": "signalExecution", + "tags": [ + "Execution" + ], + "summary": "Trigger Execution", + "description": "Signals an execution by id. Can for example be used to explicitly skip user tasks\nor signal asynchronous continuations.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the execution to signal." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecutionTriggerDto" + }, + "examples": { + "example-1": { + "summary": "POST `/execution/{id}/signal`", + "value": { + "variables": { + "myVariable": { + "value": "camunda", + "type": "String" + }, + "mySecondVariable": { + "value": 124, + "type": "Integer" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/external-task": { + "get": { + "operationId": "getExternalTasks", + "tags": [ + "External Task" + ], + "summary": "Get List", + "description": "Queries for the external tasks that fulfill given parameters. Parameters may be static as well as dynamic\nruntime properties of executions. The size of the result set can be retrieved by using the\n[Get External Task Count](https://docs.camunda.org/manual/7.22/reference/rest/external-task/get-query-count/) method.", + "parameters": [ + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task\u0027s id." + }, + { + "name": "externalTaskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the comma-separated list of external task ids." + }, + { + "name": "topicName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task topic." + }, + { + "name": "workerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + { + "name": "locked", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "notLocked", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently not locked (i.e., they have no lock or it has expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "withRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that have a positive (\u0026gt; 0) number of retries (or `null`). Value may only be\n`true`, as `false` matches any external task." + }, + { + "name": "noRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any\nexternal task." + }, + { + "name": "lockExpirationAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to external tasks that have a lock that expires after a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "lockExpirationBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to external tasks that have a lock that expires before a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the activity that an external task is created for." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the comma-separated list of ids of the activities that an external task is created for." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that an external task belongs to." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process instance that an external task belongs to." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process instance ids that an external task may belong to." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process definition that an external task belongs to." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nAn external task must have one of the given tenant ids." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active tasks. Value may only be `true`, as `false` matches any external task." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended tasks. Value may only be `true`, as `false` matches any external task." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority higher than or equal to the given value.\nValue must be a valid `long` value." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority lower than or equal to the given value.\nValue must be a valid `long` value." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "id", + "lockExpirationTime", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "taskPriority", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalTaskDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /external-task?topicName\u003daTopic", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 9, + "businessKey": "aBusinessKey" + }, + { + "activityId": "anotherActivityId", + "activityInstanceId": "anotherActivityInstanceId", + "errorMessage": "anotherErrorMessage", + "executionId": "anotherExecutionId", + "id": "anotherExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "anotherProcessDefinitionId", + "processDefinitionKey": "anotherProcessDefinitionKey", + "processInstanceId": "anotherProcessInstanceId", + "tenantId": null, + "retries": 1, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 3, + "businessKey": "aBusinessKey" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryExternalTasks", + "tags": [ + "External Task" + ], + "summary": "Get List (POST)", + "description": "Queries for external tasks that fulfill given parameters in the form of a JSON object.\n\nThis method is slightly more powerful than the\n[Get External Tasks](https://docs.camunda.org/manual/7.22/reference/rest/external-task/get-query/) method because it allows to\nspecify a hierarchical result sorting.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalTaskQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "sorting": [ + { + "sortBy": "processDefinitionKey", + "sortOrder": "asc" + }, + { + "sortBy": "lockExpirationTime", + "sortOrder": "desc" + }, + { + "sortBy": "createTime", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalTaskDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 9, + "businessKey": "aBusinessKey" + }, + { + "activityId": "anotherActivityId", + "activityInstanceId": "anotherActivityInstanceId", + "errorMessage": "anotherErrorMessage", + "executionId": "anotherExecutionId", + "id": "anotherExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "anotherProcessDefinitionKey", + "processInstanceId": "anotherProcessInstanceId", + "tenantId": null, + "retries": 1, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "aTopic", + "priority": 3, + "businessKey": "aBusinessKey" + } + ] + } + } + } + }, + "description": "Request successful. The Response is a JSON array of external task objects." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/count": { + "get": { + "operationId": "getExternalTasksCount", + "tags": [ + "External Task" + ], + "summary": "Get List Count", + "description": "Queries for the number of external tasks that fulfill given parameters. Takes the same parameters as the\n[Get External Tasks](https://docs.camunda.org/manual/7.22/reference/rest/external-task/get-query/) method.", + "parameters": [ + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task\u0027s id." + }, + { + "name": "externalTaskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the comma-separated list of external task ids." + }, + { + "name": "topicName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task topic." + }, + { + "name": "workerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + { + "name": "locked", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "notLocked", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently not locked (i.e., they have no lock or it has expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "withRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that have a positive (\u0026gt; 0) number of retries (or `null`). Value may only be\n`true`, as `false` matches any external task." + }, + { + "name": "noRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any\nexternal task." + }, + { + "name": "lockExpirationAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to external tasks that have a lock that expires after a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "lockExpirationBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to external tasks that have a lock that expires before a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the activity that an external task is created for." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the comma-separated list of ids of the activities that an external task is created for." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that an external task belongs to." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process instance that an external task belongs to." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process instance ids that an external task may belong to." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process definition that an external task belongs to." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nAn external task must have one of the given tenant ids." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active tasks. Value may only be `true`, as `false` matches any external task." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended tasks. Value may only be `true`, as `false` matches any external task." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority higher than or equal to the given value.\nValue must be a valid `long` value." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority lower than or equal to the given value.\nValue must be a valid `long` value." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET /external-task/count?topicName\u003daTopic", + "value": { + "count": 42 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryExternalTasksCount", + "tags": [ + "External Task" + ], + "summary": "Get List Count (POST)", + "description": "Queries for the number of external tasks that fulfill given parameters. This method takes the same message\nbody as the [Get External Tasks (POST)](https://docs.camunda.org/manual/7.22/reference/rest/external-task/post-query/) method.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalTaskQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/count", + "value": { + "topicName": "aTopicName", + "withRetriesLeft": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/fetchAndLock": { + "post": { + "operationId": "fetchAndLock", + "tags": [ + "External Task" + ], + "summary": "Fetch and Lock", + "description": "Fetches and locks a specific number of external tasks for execution by a worker. Query can be restricted\nto specific task topics and for each task topic an individual lock time can be provided.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchExternalTasksDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/fetchAndLock (1)", + "description": "Request with variable filtering", + "value": { + "workerId": "aWorkerId", + "maxTasks": 2, + "usePriority": true, + "topics": [ + { + "topicName": "createOrder", + "lockDuration": 10000, + "variables": [ + "orderId" + ] + } + ] + } + }, + "example-2": { + "summary": "POST /external-task/fetchAndLock (2)", + "description": "Request with all variables included", + "value": { + "workerId": "aWorkerId", + "maxTasks": 2, + "usePriority": true, + "topics": [ + { + "topicName": "createOrder", + "lockDuration": 10000, + "processDefinitionId": "aProcessDefinitionId", + "tenantIdIn": "tenantOne" + } + ] + } + }, + "example-3": { + "summary": "POST /external-task/fetchAndLock (3)", + "description": "Request with includeExtensionProperties", + "value": { + "workerId": "aWorkerId", + "maxTasks": 1, + "usePriority": true, + "topics": [ + { + "topicName": "createOrder", + "lockDuration": 10000, + "includeExtensionProperties": true + } + ] + } + }, + "example-4": { + "summary": "POST /external-task/fetchAndLock (4)", + "description": "Request with order by priority \u0026 createTime", + "value": { + "workerId": "aWorkerId", + "maxTasks": 2, + "usePriority": true, + "sorting": [ + { + "sortBy": "createTime", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LockedExternalTaskDto" + } + }, + "examples": { + "example-1": { + "summary": "POST /external-task/fetchAndLock (1)", + "description": "Request with variable filtering", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "workerId": "aWorkerId", + "priority": 4, + "topicName": "createOrder", + "variables": { + "orderId": { + "type": "String", + "value": "1234", + "valueInfo": {} + } + } + }, + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anotherErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "workerId": "aWorkerId", + "priority": 0, + "topicName": "createOrder", + "variables": { + "orderId": { + "type": "String", + "value": "3456", + "valueInfo": {} + } + } + } + ] + }, + "example-2": { + "summary": "POST /external-task/fetchAndLock (2)", + "description": "Request with all variables included", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.00+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": "tenantOne", + "retries": 3, + "workerId": "aWorkerId", + "priority": 4, + "topicName": "createOrder", + "businessKey": "aBusinessKey", + "variables": { + "orderId": { + "type": "String", + "value": "1234", + "valueInfo": {} + } + } + }, + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anotherErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "workerId": "aWorkerId", + "priority": 0, + "topicName": "createOrder", + "businessKey": "aBusinessKey", + "variables": { + "orderId": { + "type": "String", + "value": "3456", + "valueInfo": {} + } + } + } + ] + }, + "example-3": { + "summary": "POST /external-task/fetchAndLock (3)", + "description": "Request with includeExtensionProperties", + "value": [ + { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "errorDetails": "anErrorDetails", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "createTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "retries": null, + "suspended": false, + "workerId": "aWorkerId", + "topicName": "createOrder", + "tenantId": null, + "variables": {}, + "priority": 0, + "businessKey": "default", + "extensionProperties": { + "property2": "value2", + "property1": "value1" + } + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/retries": { + "put": { + "operationId": "setExternalTaskRetries", + "tags": [ + "External Task" + ], + "summary": "Set Retries Sync", + "description": "Sets the number of retries left to execute external tasks by id synchronously. If retries are set to 0, \nan incident is created.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetRetriesForExternalTasksDto" + }, + "examples": { + "example-1": { + "summary": "PUT /external-task/retries", + "value": { + "retries": 123, + "externalTaskIds": [ + "anExternalTask", + "anotherExternalTask" + ] + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case the number of retries is negative or null, an exception of type `InvalidRequestException` is\nreturned. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, \ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/retries-async": { + "post": { + "operationId": "setExternalTaskRetriesAsyncOperation", + "tags": [ + "External Task" + ], + "summary": "Set Retries Async", + "description": "Sets the number of retries left to execute external tasks by id asynchronously. If retries are set to 0,\nan incident is created.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetRetriesForExternalTasksDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/retries-async", + "value": { + "retries": 123, + "externalTaskIds": [ + "anExternalTask", + "anotherExternalTask" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If neither externalTaskIds nor externalTaskQuery are present or externalTaskIds contains null value or \nthe number of retries is negative or null, an exception of type `InvalidRequestException` is returned.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, \ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/topic-names": { + "get": { + "operationId": "getTopicNames", + "tags": [ + "External Task" + ], + "summary": "Get External Task Topic Names", + "description": "Queries for distinct topic names of external tasks that fulfill given parameters.\nQuery can be restricted to only tasks with retries left, tasks that are locked, or tasks\nthat are unlocked. The parameters withLockedTasks and withUnlockedTasks are\nexclusive. Setting them both to true will return an empty list.\nProviding no parameters will return a list of all distinct topic names with external tasks.", + "parameters": [ + { + "name": "withLockedTasks", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "withUnlockedTasks", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that are currently not locked (i.e., they have no lock or it has expired).\nValue may only be `true`, as `false` matches any external task." + }, + { + "name": "withRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include external tasks that have a positive (\u0026gt; 0) number of retries (or `null`). Value may only be\n`true`, as `false` matches any external task." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "example-1": { + "summary": "GET /external-task/topic-names?withLockedTasks", + "value": [ + "topic-a", + "topic-b", + "topic-c" + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Returned if some of the query parameters are invalid." + } + } + } + }, + "/external-task/{id}": { + "get": { + "operationId": "getExternalTask", + "tags": [ + "External Task" + ], + "summary": "Get", + "description": "Retrieves an external task by id, corresponding to the `ExternalTask` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalTaskDto" + }, + "examples": { + "example-1": { + "summary": "GET /external-task/anExternalTaskId", + "value": { + "activityId": "anActivityId", + "activityInstanceId": "anActivityInstanceId", + "errorMessage": "anErrorMessage", + "executionId": "anExecutionId", + "id": "anExternalTaskId", + "lockExpirationTime": "2015-10-06T16:34:42.000+0200", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": "aProcessInstanceId", + "tenantId": null, + "retries": 3, + "suspended": false, + "workerId": "aWorkerId", + "priority": 0, + "topicName": "aTopic", + "businessKey": "aBusinessKey" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "External task with the given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/bpmnError": { + "post": { + "operationId": "handleExternalTaskBpmnError", + "tags": [ + "External Task" + ], + "summary": "Handle BPMN Error", + "description": "Reports a business error in the context of a running external task by id. The error code must be specified\nto identify the BPMN error handler.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task in which context a BPMN error is reported." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalTaskBpmnError" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/anId/bpmnError", + "value": { + "workerId": "aWorker", + "errorCode": "bpmn-error", + "errorMessage": "anErrorMessage", + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task\u0027s most recent lock was not acquired by the provided worker.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the corresponding process instance could not be resumed successfully.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/complete": { + "post": { + "operationId": "completeExternalTaskResource", + "tags": [ + "External Task" + ], + "summary": "Complete", + "description": "Completes an external task by id and updates process variables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to complete." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompleteExternalTaskDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/anId/complete", + "value": { + "workerId": "aWorker", + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + }, + "localVariables": { + "aLocalVariable": { + "value": "aStringValue" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task\u0027s most recent lock was not acquired by the provided worker. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the corresponding process instance could not be resumed successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/errorDetails": { + "get": { + "operationId": "getExternalTaskErrorDetails", + "tags": [ + "External Task" + ], + "summary": "Get Error Details", + "description": "Retrieves the error details in the context of a running external task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task for which the error details should be retrieved." + } + ], + "responses": { + "200": { + "description": "Request successful.", + "content": { + "text/plain": { + "schema": { + "type": "string", + "description": "The error details for the external task." + }, + "examples": { + "example-1": { + "value": "org.apache.ibatis.jdbc.RuntimeSqlException: org.apache.ibatis.jdbc.RuntimeSqlException: test cause\n at org.camunda.bpm.engine.test.api.externaltask.ExternalTaskServiceTest.testHandleFailureWithErrorDetails(ExternalTaskServiceTest.java:1424)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n " + } + } + } + } + }, + "204": { + "description": "Request successful. In case the external task has no error details." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "An external task with the given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/extendLock": { + "post": { + "operationId": "extendLock", + "tags": [ + "External Task" + ], + "summary": "Extend Lock", + "description": "Extends the timeout of the lock by a given amount of time.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendLockOnExternalTaskDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/anId/extendLock", + "value": { + "workerId": "anId", + "newDuration": 100000 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case the new lock duration is negative or the external task is not locked by the given worker or not \nlocked at all, an exception of type `InvalidRequestException` is returned. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/failure": { + "post": { + "operationId": "handleFailure", + "tags": [ + "External Task" + ], + "summary": "Handle Failure", + "description": "Reports a failure to execute an external task by id. A number of retries and a timeout until the task can\nbe retried can be specified. If retries are set to 0, an incident for this task is created.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task to report a failure for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExternalTaskFailureDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/anId/failure", + "value": { + "workerId": "aWorker", + "errorMessage": "Does not compute", + "retries": 3, + "retryTimeout": 60000 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task\u0027s most recent lock was not acquired by the provided worker. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the corresponding process instance could not be resumed successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/lock": { + "post": { + "operationId": "lock", + "tags": [ + "External Task" + ], + "description": "Lock an external task by a given id for a specified worker and amount of time.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LockExternalTaskDto" + }, + "examples": { + "example-1": { + "summary": "POST /external-task/anId/lock", + "value": { + "workerId": "anId", + "lockDuration": 100000 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case the lock duration is negative or the external task is already locked by\na different worker, an exception of type `InvalidRequestException` is returned. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/priority": { + "put": { + "operationId": "setExternalTaskResourcePriority", + "tags": [ + "External Task" + ], + "summary": "Set Priority", + "description": "Sets the priority of an existing external task by id. The default value of a priority is 0.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task to set the priority for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PriorityDto" + }, + "examples": { + "example-1": { + "summary": "PUT /external-task/anId/priority", + "value": { + "priority": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/retries": { + "put": { + "operationId": "setExternalTaskResourceRetries", + "tags": [ + "External Task" + ], + "summary": "Set Retries", + "description": "Sets the number of retries left to execute an external task by id. If retries are set to 0, an \nincident is created.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task to set the number of retries for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RetriesDto" + }, + "examples": { + "example-1": { + "summary": "PUT /external-task/anId/retries", + "value": { + "retries": 123 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case the number of retries is negative or null, an exception of type `InvalidRequestException`\nis returned. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/external-task/{id}/unlock": { + "post": { + "operationId": "unlock", + "tags": [ + "External Task" + ], + "summary": "Unlock", + "description": "Unlocks an external task by id. Clears the task\u0027s lock expiration time and worker id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the external task to unlock." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task,\ne.g., due to a caught BPMN boundary event. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/filter": { + "get": { + "operationId": "getFilterList", + "tags": [ + "Filter" + ], + "summary": "Get Filters", + "description": "Queries for a list of filters using a list of parameters. The size of the result\nset can be retrieved\nby using the [Get Filter Count](https://docs.camunda.org/manual/7.22/reference/rest/filter/get-query-count/) method.", + "parameters": [ + { + "name": "filterId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the filter." + }, + { + "name": "resourceType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the resource type of the filter, e.g., `Task`." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the filter." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "owner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the user id of the owner of the filter." + }, + { + "name": "itemCount", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, each filter result will contain an `itemCount` property\nwith the number of items matched by the filter itself." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "filterId", + "resourceType", + "name", + "owner" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FilterDto" + } + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter?resourceType\u003dTask`", + "value": [ + { + "id": "aFilter", + "resourceType": "Task", + "name": "My Filter", + "owner": "jonny1", + "query": { + "assignee": "jonny1" + }, + "properties": { + "color": "#58FA58", + "description": "Filters assigned to me" + } + }, + { + "id": "anotherFilter", + "resourceType": "Task", + "name": "Accountants Filter", + "owner": "demo", + "query": { + "candidateGroup": "accountant" + }, + "properties": { + "description": "Filters assigned to me", + "priority": 10 + } + } + ] + }, + "example-2": { + "summary": "request with itemCount", + "description": "GET `/filter?resourceType\u003dTask\u0026itemCount\u003dtrue`", + "value": [ + { + "id": "aFilter", + "resourceType": "Task", + "name": "My Filter", + "owner": "jonny1", + "query": { + "assignee": "jonny1" + }, + "properties": { + "color": "#58FA58", + "description": "Filters assigned to me" + }, + "itemCount": 13 + }, + { + "id": "anotherFilter", + "resourceType": "Task", + "name": "Accountants Filter", + "owner": "demo", + "query": { + "candidateGroup": "accountant" + }, + "properties": { + "description": "Filters assigned to me", + "priority": 10 + }, + "itemCount": 42 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nReturned if some of the query parameters are invalid, for example if\na `sortOrder`\nparameter is supplied, but no `sortBy` is specified. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + }, + "options": { + "operationId": "filterResourceOptions", + "tags": [ + "Filter" + ], + "summary": "Filter Resource Options", + "description": "The OPTIONS request allows you to check for the set of available operations \nthat the currently authenticated user can perform on the `/filter` resource.\nWhether the user can perform an operation or not may depend on various\nfactors, including the users authorizations to interact with this\nresource and the internal configuration of the process engine.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "OPTIONS `/filter`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/filter/create", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/filter/count": { + "get": { + "operationId": "getFilterCount", + "tags": [ + "Filter" + ], + "summary": "Get Filter Count", + "description": "Retrieves the number of filters that fulfill a provided query. Corresponds to the\nsize of the result set when using the \n[Get Filters](https://docs.camunda.org/manual/7.22/reference/rest/filter/get-query/) method.", + "parameters": [ + { + "name": "filterId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the filter." + }, + { + "name": "resourceType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the resource type of the filter, e.g., `Task`." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the filter." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "owner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the user id of the owner of the filter." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter/count?resourceType\u003dTask\u0026owner\u003daUserId`", + "value": { + "count": 3 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nReturned if some of the query parameters are invalid, for example if\na `sortOrder`parameter is supplied, but no `sortBy`, or if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/filter/create": { + "post": { + "operationId": "createFilter", + "tags": [ + "Filter" + ], + "summary": "Create Filter", + "description": "Creates a new filter.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFilterDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `/filter/create`", + "value": { + "resourceType": "Task", + "name": "Accounting Tasks", + "owner": "jonny1", + "query": { + "candidateGroup": "accounting" + }, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `/filter/create`", + "value": { + "id": "aFilterId", + "resourceType": "Task", + "name": "Accounting Tasks", + "owner": "jonny1", + "query": { + "candidateGroup": "accounting" + }, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + } + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter was invalid. See\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to create a new filter. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/filter/{id}": { + "delete": { + "operationId": "deleteFilter", + "tags": [ + "Filter" + ], + "summary": "Delete Filter", + "description": "Deletes a filter by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to delete this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter cannot be found. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + }, + "get": { + "operationId": "getSingleFilter", + "tags": [ + "Filter" + ], + "summary": "Get Single Filter", + "description": "Retrieves a single filter by id, according to the `Filter` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to be retrieved." + }, + { + "name": "itemCount", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, each filter result will contain an `itemCount`\nproperty with the number of items matched by the filter itself." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter/aFilterId`", + "value": { + "id": "9917d731-3cde-11e4-b704-f0def1e59da8", + "name": "Accounting Tasks", + "owner": null, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + }, + "query": { + "candidateGroup": "accounting" + }, + "resourceType": "Task" + } + }, + "example-2": { + "summary": "request with itemCount", + "description": "GET `/filter/aFilterId?itemCount\u003dtrue`", + "value": { + "id": "9917d731-3cde-11e4-b704-f0def1e59da8", + "name": "Accounting Tasks", + "owner": null, + "properties": { + "color": "#3e4d2f", + "description": "Tasks assigned to group accounting", + "priority": 5 + }, + "query": { + "candidateGroup": "accounting" + }, + "resourceType": "Task", + "itemCount": 23 + } + } + } + } + }, + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authenticated user is unauthorized to read this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Filter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "filterResourceOptionsSingle", + "tags": [ + "Filter" + ], + "summary": "Filter Resource Options", + "description": "The OPTIONS request allows you to check for the set of available operations \nthat the currently authenticated user can perform on the `/filter` resource.\nWhether the user can perform an operation or not may depend on various\nfactors, including the users authorizations to interact with this\nresource and the internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to be checked." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "OPTIONS `/filter/aFilterId`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter/aFilterId", + "rel": "self" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/singleResult", + "rel": "singleResult" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/singleResult", + "rel": "singleResult" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/list", + "rel": "list" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/list", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/filter/aFilterId/count", + "rel": "count" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/filter/aFilterId", + "rel": "update" + }, + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/filter/aFilterId", + "rel": "delete" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + }, + "put": { + "operationId": "updateFilter", + "tags": [ + "Filter" + ], + "summary": "Update Filter", + "description": "Updates an existing filter.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFilterDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "PUT `/filter/aFilterID`", + "value": { + "resourceType": "Task", + "name": "My Tasks", + "owner": "jonny1", + "query": { + "assignee": "jonny1" + }, + "properties": { + "color": "#99CCFF", + "description": "Tasks assigned to me", + "priority": -10 + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter was invalid. See\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to update this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter cannot be found. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/filter/{id}/count": { + "get": { + "operationId": "executeFilterCount", + "tags": [ + "Filter" + ], + "summary": "Execute Filter Count", + "description": "Executes the saved query of the filter by id and returns the count.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter/aTaskFilterId/count`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + }, + "post": { + "operationId": "postExecuteFilterCount", + "tags": [ + "Filter" + ], + "summary": "Execute Filter Count (POST)", + "description": "Executes the saved query of the filter by id and returns the count. This method is\nslightly more powerful then the [Get Execute Filter Count](https://docs.camunda.org/manual/7.22/reference/rest/filter/get-execute-count/) \nmethod because it allows to extend the saved query of the filter.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + } + ], + "requestBody": { + "description": "A JSON object which corresponds to the type of the saved query of the filter, i.e., if the resource type of the filter is Task the body should form a valid task query corresponding to the Task resource.", + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`. Note: The examples show a task filter. So the request body corresponds to a task query. For other resource types the request body will differ.", + "value": { + "assignee": "jonny1", + "taskDefinitionKey": "aTaskKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe extending query was invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/filter/{id}/list": { + "get": { + "operationId": "executeFilterList", + "tags": [ + "Filter" + ], + "summary": "Execute Filter List", + "description": "Executes the saved query of the filter by id and returns the result list.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter/aTaskFilterId/list/?firstResult\u003d0\u0026maxResults\u003d2`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": [ + { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "id": "aTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + }, + { + "assignee": "demo", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T10:42:18.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "anotherExecutionId", + "followUp": null, + "formKey": null, + "id": "anotherTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "anotherProcessId", + "processInstanceId": "anotherProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "anotherTaskKey" + } + ] + } + } + } + }, + "description": "Request successful. A JSON array containing JSON objects corresponding to the matching entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible to specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + }, + "post": { + "operationId": "postExecuteFilterList", + "tags": [ + "Filter" + ], + "summary": "Execute Filter List (POST)", + "description": "Executes the saved query of the filter by id and returns the result list. This\nmethod is slightly more powerful then the \n[Get Execute FilterList](https://docs.camunda.org/manual/7.22/reference/rest/filter/get-execute-list/) method\nbecause it allows to extend the saved query of the filter.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "description": "A JSON object which corresponds to the type of the saved query of the filter, i.e., if the resource type of the filter is Task the body should form a valid task query corresponding to the Task resource.", + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `/filter/aTaskFilterId/list/?firstResult\u003d0\u0026maxResults\u003d2`. **Note**: The examples show a task filter. So the request body corresponds to a task query. For other resource types the request body will differ.", + "value": { + "assignee": "jonny1", + "taskDefinitionKey": "aTaskKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `/filter/aTaskFilterId/list/?firstResult\u003d0\u0026maxResults\u003d2`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": [ + { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "id": "aTaskId", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + } + ] + } + } + } + }, + "description": "Request successful. A JSON array containing JSON objects corresponding to the matching entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible to specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe extending query was invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/filter/{id}/singleResult": { + "get": { + "operationId": "executeFilterSingleResult", + "tags": [ + "Filter" + ], + "summary": "Execute Filter Single Result", + "description": "Executes the saved query of the filter by id and returns the single result.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/filter/aTaskFilterId/singleResult`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "id": "aTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + } + } + } + } + }, + "description": "Request successful. A JSON object corresponding to the matching entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible to specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + }, + "204": { + "description": "Request successful, but the result was empty. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe executed filter returned more than one single result. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + }, + "post": { + "operationId": "postExecuteFilterSingleResult", + "tags": [ + "Filter" + ], + "summary": "Execute Filter Single Result (POST)", + "description": "Executes the saved query of the filter by id and returns the single result. This method is slightly more\npowerful then the [Get Execute Filter Single Result](https://docs.camunda.org/manual/7.22/reference/rest/filter/get-execute-single-result/)\nmethod because it allows to extend the saved query of the filter.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the filter to execute." + } + ], + "requestBody": { + "description": "A JSON object which corresponds to the type of the saved query of the filter, i.e., if the resource type of the filter is Task the body should form a valid task query corresponding to the Task resource.", + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`. **Note**: The examples show a task filter. So the request body corresponds to a task query. For other resource types the request body will differ.", + "value": { + "assignee": "jonny1", + "taskDefinitionKey": "aTaskKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "POST `filter/aTaskFilterId/singleResult`. **Note**: The examples show the result of a task filter. So the response corresponds to a task, but for other filters the response format will differ.", + "value": { + "assignee": "jonny1", + "caseDefinitionId": null, + "caseExecutionId": null, + "caseInstanceId": null, + "created": "2014-09-15T15:45:48.000+0200", + "delegationState": null, + "description": null, + "due": null, + "executionId": "aExecutionId", + "followUp": null, + "formKey": null, + "id": "aTaskId", + "lastUpdated": "2014-09-15T15:45:48.000+0200", + "name": "Task 2", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "aProcessId", + "processInstanceId": "aProcessInstanceId", + "suspended": false, + "taskDefinitionKey": "aTaskKey" + } + } + } + } + }, + "description": "Request successful. A JSON object corresponding to the corresponding entity interface in the engine. This depends on the saved query in the filter. Therefore it is not possible specify a generic result format, i.e., if the resource type of the filter is Task the result will correspond to the Task interface in the engine." + }, + "204": { + "description": "Request successful, but the result was empty. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe executed filter returned more than one single result or the\nextending query was invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe authenticated user is unauthorized to read this filter. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nFilter with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/group": { + "get": { + "operationId": "getQueryGroups", + "tags": [ + "Group" + ], + "summary": "Get List", + "description": "Queries for a list of groups using a list of parameters. The size of the result set can be retrieved\nby using the [Get Group Count](https://docs.camunda.org/manual/7.22/reference/rest/group/get-query-count) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "id", + "name", + "type" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the group." + }, + { + "name": "idIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma seperated list of group ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the group." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the group." + }, + { + "name": "member", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only retrieve groups where the given user id is a member of." + }, + { + "name": "memberOfTenant", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only retrieve groups which are members of the given tenant." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/group?name\u003dSales`", + "value": [ + { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableGroupOperations", + "tags": [ + "Group" + ], + "summary": "Group Resource Options", + "description": "The `/group` resource supports two custom OPTIONS requests, this one for the resource as such and one for\nindividual group instances. The OPTIONS request allows checking for the set of available operations that\nthe currently authenticated user can perform on the `/group` resource. If the user can perform an operation\nor not may depend on various things, including the users authorizations to interact with this resource and\nthe internal configuration of the process engine.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/group`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/group", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/group/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/group/create", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + }, + "post": { + "operationId": "postQueryGroups", + "tags": [ + "Group" + ], + "summary": "Get List (POST)", + "description": "Queries for a list of groups using a list of parameters.\nThe size of the result set can be retrieved by using the\n[Get Group Count (POST)](https://docs.camunda.org/manual/7.22/reference/rest/group/post-query-count/) method.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/group`", + "value": { + "name": "Sales" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/group`", + "value": [ + { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/group/count": { + "get": { + "operationId": "getGroupCount", + "tags": [ + "Group" + ], + "summary": "Get List Count", + "description": "Queries for groups using a list of parameters and retrieves the count.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the group." + }, + { + "name": "idIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma seperated list of group ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the group." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the group." + }, + { + "name": "member", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only retrieve groups where the given user id is a member of." + }, + { + "name": "memberOfTenant", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only retrieve groups which are members of the given tenant." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/group/count?name\u003dSales`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response\nformat." + } + } + }, + "post": { + "operationId": "queryGroupCount", + "tags": [ + "Group" + ], + "summary": "Get List Count (POST)", + "description": "Queries for groups using a list of parameters and retrieves the count.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/group/count`", + "value": { + "name": "Sales" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/group/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response\nformat." + } + } + } + }, + "/group/create": { + "post": { + "operationId": "createGroup", + "tags": [ + "Group" + ], + "summary": "Create Group", + "description": "Creates a new group.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupDto" + }, + "examples": { + "example-1": { + "summary": "POST `/group/create`", + "value": { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The group could not be created due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/group/{id}": { + "delete": { + "operationId": "deleteGroup", + "tags": [ + "Group" + ], + "summary": "Delete Group", + "description": "Deletes a group by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Group cannot be found. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for\nthe error response format." + } + } + }, + "get": { + "operationId": "getGroup", + "tags": [ + "Group" + ], + "summary": "Get Group", + "description": "Retrieves a group by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/group/sales`", + "value": { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Group with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableGroupInstanceOperations", + "tags": [ + "Group" + ], + "summary": "Group Resource Instance Options", + "description": "The `/group` resource supports two custom OPTIONS requests, one for the resource as such and this one for individual group instances.\nThe OPTIONS request allows checking for the set of available operations that the currently authenticated user can perform on the\n`/group/{id}` resource instance. If the user can perform an operation or not may depend on various things, including the users authorizations\nto interact with this resource and the internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/group/aGroupId`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/group/aGroupId", + "rel": "self" + }, + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/group/aGroupId", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/group/aGroupId", + "rel": "update" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + }, + "put": { + "operationId": "updateGroup", + "tags": [ + "Group" + ], + "summary": "Update Group", + "description": "Updates a given group by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/group/sales`", + "value": { + "id": "sales", + "name": "Sales", + "type": "Organizational Unit" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. No content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the group with the requested Id cannot be found." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The group could not be updated due to an internal server error.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error\nresponse format." + } + } + } + }, + "/group/{id}/members": { + "options": { + "operationId": "availableGroupMembersOperations", + "tags": [ + "Group" + ], + "summary": "Group Membership Resource Options", + "description": "The OPTIONS request allows checking for the set of available operations that the currently authenticated\nuser can perform on the resource. If the user can perform an operation or not may depend on various\nthings, including the users authorizations to interact with this resource and the internal configuration\nof the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "OPTIONS `/group/sales/members`", + "value": { + "links": [ + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/group/sales/members", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/group/sales/members", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/group/{id}/members/{userId}": { + "delete": { + "operationId": "deleteGroupMember", + "tags": [ + "Group" + ], + "summary": "Delete a Group Member", + "description": "Removes a member from a group.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + }, + { + "name": "userId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of user to remove from the group." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "createGroupMember", + "tags": [ + "Group" + ], + "summary": "Create Group Member", + "description": "Adds a member to a group.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + }, + { + "name": "userId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of user to add to the group." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an internal error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/activity-instance": { + "get": { + "operationId": "getHistoricActivityInstances", + "tags": [ + "Historic Activity Instance" + ], + "summary": "Get List", + "description": "Queries for historic activity instances that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Historic Activity Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/activity-instance/get-activity-instance-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "activityInstanceId", + "instanceId", + "executionId", + "activityId", + "activityName", + "activityType", + "startTime", + "endTime", + "duration", + "definitionId", + "occurrence", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "activityInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity instance id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that executed the activity instance." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity id (according to BPMN 2.0 XML)." + }, + { + "name": "activityName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity name (according to BPMN 2.0 XML)." + }, + { + "name": "activityType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity type." + }, + { + "name": "taskAssignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include activity instances that are user tasks and assigned to a given user." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "canceled", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include canceled activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "completeScope", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include activity instances which completed a scope.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of ids. An activity instance must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic activity instances that belong to no tenant. Value may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricActivityInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/activity-instance?activityType\u003duserTask\u0026taskAssignee\u003dpeter`", + "value": [ + { + "activityId": "anActivity", + "activityName": "anActivityName", + "activityType": "userTask", + "assignee": "peter", + "calledProcessInstanceId": "aHistoricCalledProcessInstanceId", + "calledCaseInstanceId": null, + "canceled": true, + "completeScope": false, + "durationInMillis": 2000, + "endTime": "2013-04-23T18:42:43.000+0200", + "executionId": "anExecutionId", + "id": "aHistoricActivityInstanceId", + "parentActivityInstanceId": "aHistoricParentActivityInstanceId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "startTime": "2013-04-23T11:20:43.000+0200", + "taskId": "aTaskId", + "tenantId": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricActivityInstances", + "tags": [ + "Historic Activity Instance" + ], + "summary": "Get List (POST)", + "description": "Queries for historic activity instances that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Historic Activity Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/activity-instance/get-activity-instance-query-count/) method.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricActivityInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/activity-instance`", + "value": { + "activityType": "userTask", + "taskAssignee": "peter", + "sorting": [ + { + "sortBy": "activityId", + "sortOrder": "asc" + }, + { + "sortBy": "executionId", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricActivityInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": [ + { + "activityId": "anActivity", + "activityName": "anActivityName", + "activityType": "userTask", + "assignee": "peter", + "calledProcessInstanceId": "aHistoricCalledProcessInstanceId", + "calledCaseInstanceId": null, + "canceled": true, + "completeScope": false, + "durationInMillis": 2000, + "endTime": "2013-04-23T18:42:43.000+0200", + "executionId": "anExecutionId", + "id": "aHistoricActivityInstanceId", + "parentActivityInstanceId": "aHistoricParentActivityInstanceId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "startTime": "2013-04-23T11:20:43.000+0200", + "taskId": "aTaskId", + "tenantId": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/activity-instance/count": { + "get": { + "operationId": "getHistoricActivityInstancesCount", + "tags": [ + "Historic Activity Instance" + ], + "summary": "Get List Count", + "description": "Queries for the number of historic activity instances that fulfill the given parameters.\nTakes the same parameters as the [Get Historic Activity Instance](https://docs.camunda.org/manual/7.22/reference/rest/history/activity-instance/get-activity-instance-query/) method.", + "parameters": [ + { + "name": "activityInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity instance id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that executed the activity instance." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity id (according to BPMN 2.0 XML)." + }, + { + "name": "activityName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity name (according to BPMN 2.0 XML)." + }, + { + "name": "activityType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity type." + }, + { + "name": "taskAssignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include activity instances that are user tasks and assigned to a given user." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "canceled", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include canceled activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "completeScope", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include activity instances which completed a scope.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of ids. An activity instance must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic activity instances that belong to no tenant. Value may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/activity-instance/count?activityType\u003duserTask`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricActivityInstancesCount", + "tags": [ + "Historic Activity Instance" + ], + "summary": "Get List Count (POST)", + "description": "Queries for the number of historic activity instances that fulfill the given parameters.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricActivityInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/activity-instance/count`", + "value": { + "activityType": "userTask" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/activity-instance/{id}": { + "get": { + "operationId": "getHistoricActivityInstance", + "tags": [ + "Historic Activity Instance" + ], + "summary": "Get", + "description": "Retrieves a historic activity instance by id, according to the `HistoricActivityInstance` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic activity instance to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricActivityInstanceDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/activity-instance/aActivityInstId`", + "value": { + "id": "aActivityInstId", + "activityId": "anActivity", + "activityName": "anActivityName", + "activityType": "userTask", + "assignee": "peter", + "calledProcessInstanceId": "aHistoricCalledProcessInstanceId", + "calledCaseInstanceId": null, + "canceled": true, + "completeScope": false, + "durationInMillis": 2000, + "endTime": "2013-04-23T18:42:43.000+0200", + "executionId": "anExecutionId", + "parentActivityInstanceId": "aHistoricParentActivityInstanceId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "startTime": "2013-04-23T11:20:43.000+0200", + "taskId": "aTaskId", + "tenantId": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not Found\nHistoric activity instance with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/batch": { + "get": { + "operationId": "getHistoricBatches", + "tags": [ + "Historic Batch" + ], + "summary": "Get Historic Batches", + "description": "Queries for historic batches that fulfill given parameters. Parameters may be\nthe properties of batches, such as the id or type. The\nsize of the result set can be retrieved by using the\n[Get Historic Batch Count](https://docs.camunda.org/manual/7.22/reference/rest/history/batch/get-query-count/)\nmethod.", + "parameters": [ + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "completed", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "\nFilter completed or not completed batches. If the value is\n`true`, only completed batches, i.e., end time is set, are\nreturned. Otherwise, if the value is `false`, only running\nbatches, i.e., end time is null, are returned." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A batch matches if it has one of the given\ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant. Value can effectively only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "batchId", + "startTime", + "endTime", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricBatchDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/batch?type\u003daBatchType\u0026completed\u003dtrue\u0026sortBy\u003dbatchId\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "createUserId": "aUserId", + "startTime": "2016-04-12T15:29:33.000+0200", + "endTime": "2016-04-12T16:23:34.000+0200", + "removalTime": "2016-04-15T16:23:34.000+0200" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nReturned if some of the query parameters are invalid, for example if\na `sortOrder` parameter is supplied, but no `sortBy`.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/history/batch/cleanable-batch-report": { + "get": { + "operationId": "getCleanableHistoricBatchesReport", + "tags": [ + "Historic Batch" + ], + "summary": "Get Cleanable Batch Report", + "description": "Retrieves a report about a historic batch operations relevant to history cleanup\n(see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)\n) so that you can tune the history time to live.\nThese reports include the count of the finished batches, cleanable\nbatches and type of the batch.\nThe size of the result set can be retrieved by using the\n[Get Cleanable Batch Report Count](https://docs.camunda.org/manual/7.22/reference/rest/history/batch/get-cleanable-batch-report-count/)\nmethod.\n\n**Please note:**\nThe history time to live for batch operations does not support [Multi-Tenancy](https://docs.camunda.org/manual/7.22/user-guide/process-engine/multi-tenancy.md).\nThe report will return an information for all batch operations (for all tenants) if you have permissions\nto see the history.\n", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "finished" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CleanableHistoricBatchReportResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/batch/cleanable-batch-report`", + "description": "GET `/history/batch/cleanable-batch-report`\n\n An array containing finished batches information relevant to history cleanup.", + "value": [ + { + "batchType": "instance-modification", + "historyTimeToLive": 5, + "finishedBatchCount": 100, + "cleanableBatchCount": 53 + }, + { + "batchType": "instance-deletion", + "historyTimeToLive": 5, + "finishedBatchCount": 1000, + "cleanableBatchCount": 13 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/batch/cleanable-batch-report/count": { + "get": { + "operationId": "getCleanableHistoricBatchesReportCount", + "tags": [ + "Historic Batch" + ], + "summary": "Get Cleanable Batch Report Count", + "description": "Queries for the number of report results about a historic batch operations relevant\nto history cleanup (see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)\n).\nTakes the same parameters as the\n[Get Cleanable Batch Report](https://docs.camunda.org/manual/7.22/reference/rest/history/batch/get-cleanable-batch-report/)\nmethod.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/batch/cleanable-batch-report/count`", + "description": "GET `/history/batch/cleanable-batch-report/count`", + "value": { + "count": 10 + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/batch/count": { + "get": { + "operationId": "getHistoricBatchesCount", + "tags": [ + "Historic Batch" + ], + "summary": "Get Historic Batch Count", + "description": "Requests the number of historic batches that fulfill the query criteria.\nTakes the same filtering parameters as the\n[Get Historic Batches](https://docs.camunda.org/manual/7.22/reference/rest/history/batch/get-query/)\nmethod.", + "parameters": [ + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch id." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by batch type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + { + "name": "completed", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "\nFilter completed or not completed batches. If the value is\n`true`, only completed batches, i.e., end time is set, are\nreturned. Otherwise, if the value is `false`, only running\nbatches, i.e., end time is null, are returned." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A batch matches if it has one of the given\ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include batches which belong to no tenant. Value can effectively only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/batch/count?type\u003daBatchType`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nReturned if some of the query parameters are invalid, for example if\na `sortOrder` parameter is supplied, but no `sortBy`.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/history/batch/set-removal-time": { + "post": { + "operationId": "setRemovalTimeAsyncHistoricBatch", + "tags": [ + "Historic Batch" + ], + "summary": "Set Removal Time Async (POST)", + "description": "Sets the removal time to multiple historic batches asynchronously (batch).\n\nAt least __historicBatchIds__ or __historicBatchQuery__ has to be\nprovided. If both are provided,\nall instances matching query criterion and instances from the list\nwill be updated with a removal time.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetRemovalTimeToHistoricBatchesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/batch/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "historicBatchQuery": { + "completed": true + }, + "historicBatchIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/history/batch/set-removal-time`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "batch-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nRequest was unsuccessful due to a bad user request. This occurs if\nsome of the query parameters are invalid, e.g. if neither\nhistoricBatchIds nor historicBatchQuery is present or if no mode is\nspecified.\n\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/history/batch/{id}": { + "delete": { + "operationId": "deleteHistoricBatch", + "tags": [ + "Historic Batch" + ], + "summary": "Delete Historic Batch", + "description": "Deletes a historic batch by id, including related historic job logs.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the batch to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic batch with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getHistoricBatch", + "tags": [ + "Historic Batch" + ], + "summary": "Get Historic Batch", + "description": "Retrieves a historic batch by id, according to the `HistoricBatch` interface in the\nengine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic batch to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricBatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/batch/aBatchId`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "size": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "createUserId": "aUserId", + "startTime": "2016-04-12T15:29:33.000+0200", + "endTime": "2016-04-12T16:23:34.000+0200", + "removalTime": "2016-04-15T16:23:34.000+0200" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nHistoric batch with given id does not exist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/history/cleanup": { + "post": { + "operationId": "cleanupAsync", + "tags": [ + "History Cleanup" + ], + "summary": "Clean up history (POST)", + "description": "Schedules asynchronous history cleanup (See\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).\n\n**Note:** This endpoint will return at most a single history cleanup job.\nSince version `7.9.0` it is possible to configure multiple\n[parallel history cleanup jobs](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#parallel-execution). Use\n[`GET /history/cleanup/jobs`](https://docs.camunda.org/manual/7.22/reference/rest/history/history-cleanup/get-history-cleanup-jobs)\nto find all the available history cleanup jobs.", + "parameters": [ + { + "name": "immediatelyDue", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "When true the job will be scheduled for nearest future. When `false`, the job will be\nscheduled for next batch window start time. Default is `true`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/cleanup?immediatelyDue\u003dfalse`", + "description": "POST `/history/cleanup?immediatelyDue\u003dfalse`", + "value": { + "id": "074bd92a-1a95-11e7-8ceb-34f39ab71d4e", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2017-04-01T09:45:15.039+0100" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid or the engine\ndoes not participate in history cleanup. See\n[Cleanup Execution Participation per Node](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#cleanup-execution-participation-per-node)." + } + } + } + }, + "/history/cleanup/configuration": { + "get": { + "operationId": "getHistoryCleanupConfiguration", + "tags": [ + "History Cleanup" + ], + "summary": "Get History Cleanup Configuration", + "description": "Retrieves history cleanup batch window configuration (See\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryCleanupConfigurationDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/cleanup/configuration`", + "description": "GET `/history/cleanup/configuration`", + "value": { + "batchWindowStartTime": "2017-09-11T23:59:00.000+0200", + "batchWindowEndTime": "2017-09-12T02:00:00.000+0200", + "enabled": "true" + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/history/cleanup/job": { + "get": { + "deprecated": true, + "operationId": "findCleanupJob", + "tags": [ + "History Cleanup" + ], + "summary": "Find clean up history job (GET)", + "description": "**Deprecated!** Use `GET /history/cleanup/jobs` instead.\n\nFinds history cleanup job (See\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/cleanup/job`", + "description": "GET `/history/cleanup/job`", + "value": { + "id": "074bd92a-1a95-11e7-8ceb-34f39ab71d4e", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2017-05-05T17:00:00+0200" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "History clean up job does not exist." + } + } + } + }, + "/history/cleanup/jobs": { + "get": { + "operationId": "findCleanupJobs", + "tags": [ + "History Cleanup" + ], + "summary": "Find clean up history jobs (GET)", + "description": "Finds history cleanup jobs (See\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/cleanup/jobs`", + "description": "GET `/history/cleanup/jobs`", + "value": [ + { + "id": "aJobId", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "aDueDate", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200" + }, + { + "id": "anotherJobId", + "jobDefinitionId": null, + "processInstanceId": null, + "processDefinitionId": null, + "processDefinitionKey": null, + "executionId": null, + "exceptionMessage": null, + "retries": 3, + "dueDate": "anotherDueDate", + "suspended": false, + "priority": 0, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "History clean up jobs are empty." + } + } + } + }, + "/history/decision-definition/cleanable-decision-instance-report": { + "get": { + "operationId": "getCleanableHistoricDecisionInstanceReport", + "tags": [ + "Historic Decision Definition" + ], + "summary": "Get Cleanable Decision Instance Report", + "description": "Retrieves a report about a decision definition and finished decision instances\nrelevant to history cleanup (see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)), \nso that you can tune the history time to live.\nThese reports include the count of the finished historic decision\ninstances, cleanable decision instances and basic decision definition\ndata - id, key, name and version.\nThe size of the result set can be retrieved by using the \n[Get Cleanable Decision Instance Report Count](https://docs.camunda.org/manual/7.22/reference/rest/history/decision-definition/get-cleanable-decision-instance-report-count/) method.", + "parameters": [ + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition ids. Must be a comma-separated list of decision definition ids." + }, + { + "name": "decisionDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition keys. Must be a comma-separated list of decision definition keys." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A decision definition must have one of the given tenant \nids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which belong to no tenant. Value may only be `true`, as `false` \nis the default behavior." + }, + { + "name": "compact", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision instances which have more than zero finished instances. Value may only be `true`, \nas `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "finished" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CleanableHistoricDecisionInstanceReportResultDto" + } + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/history/decision-definition/cleanable-decision-instance-report`", + "value": [ + { + "decisionDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "decisionDefinitionKey": "invoice", + "decisionDefinitionName": "Invoice Receipt", + "decisionDefinitionVersion": 1, + "historyTimeToLive": 5, + "finishedDecisionInstanceCount": 100, + "cleanableDecisionInstanceCount": 53, + "tenantId": "aTenantId" + }, + { + "decisionDefinitionId": "invoice:2:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "decisionDefinitionKey": "invoice", + "decisionDefinitionName": "Invoice Receipt v2.0", + "decisionDefinitionVersion": 2, + "historyTimeToLive": 5, + "finishedDecisionInstanceCount": 1000, + "cleanableDecisionInstanceCount": 13, + "tenantId": "aTenantId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/history/decision-definition/cleanable-decision-instance-report/count": { + "get": { + "operationId": "getCleanableHistoricDecisionInstanceReportCount", + "tags": [ + "Historic Decision Definition" + ], + "summary": "Get Cleanable Decision Instance Report Count", + "description": "Queries for the number of report results about a decision definition and finished\ndecision instances relevant to history cleanup (see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).\nTakes the same parameters as the [Get Cleanable Decision Instance Report](https://docs.camunda.org/manual/7.22/reference/rest/history/decision-definition/get-cleanable-decision-instance-report/) \nmethod.", + "parameters": [ + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition ids. Must be a comma-separated list of decision definition ids." + }, + { + "name": "decisionDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision definition keys. Must be a comma-separated list of decision definition keys." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A decision definition must have one of the given tenant \nids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision definitions which belong to no tenant. Value may only be `true`, as `false` \nis the default behavior." + }, + { + "name": "compact", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include decision instances which have more than zero finished instances. Value may only be `true`, \nas `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/history/decision-definition/cleanable-decision-instance-report/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/history/decision-instance": { + "get": { + "operationId": "getHistoricDecisionInstances", + "tags": [ + "Historic Decision Instance" + ], + "summary": "Get Historic Decision Instances", + "description": "Queries for historic decision instances that fulfill the given parameters. \nThe size of the result set can be retrieved by using the \n[Get Historic Decision Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/decision-instance/get-decision-instance-query-count/) \nmethod.", + "parameters": [ + { + "name": "decisionInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision instance id." + }, + { + "name": "decisionInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision instance ids. Must be a comma-separated list of decision instance ids." + }, + { + "name": "decisionDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision definitions the instances belongs to. Must be a\ncomma-separated list of decision definition ids." + }, + { + "name": "decisionDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the keys of the decision definition the instances belongs to. Must be a comma-\nseparated list of decision definition keys." + }, + { + "name": "decisionDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition the instances belongs to, that the parameter\nis a substring of." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the instances belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances belongs to." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process instance the instances belongs to." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case definition the instances belongs to." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the case definition the instances belongs to." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case instance the instances belongs to." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity ids the instances belongs to.\nMust be a comma-separated list of acitvity ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity instance ids the instances belongs to.\nMust be a comma-separated list of acitvity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A historic decision instance must have one\nof the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic decision instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "evaluatedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were evaluated before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "evaluatedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were evaluated after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that were evaluated by the given user." + }, + { + "name": "rootDecisionInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have a given root decision instance id.\nThis also includes the decision instance with the given id." + }, + { + "name": "rootDecisionInstancesOnly", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances those are the root decision instance of an evaluation.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision requirements definition the instances belongs to." + }, + { + "name": "decisionRequirementsDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision requirements definition the instances belongs to." + }, + { + "name": "includeInputs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include input values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "includeOutputs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include output values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "disableBinaryFetching", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Disables fetching of byte array input and output values.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "disableCustomObjectDeserialization", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Disables deserialization of input and output values that are custom objects.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "evaluationTime", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricDecisionInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "request including inputs and outputs", + "description": "GET `/history/decision-instance?includeInputs\u003dtrue\u0026includeOutputs\u003dtrue`", + "value": [ + { + "activityId": "assignApprover", + "activityInstanceId": "assignApprover:67e9de1e-579d-11e5-9848-f0def1e59da8", + "collectResultValue": null, + "decisionDefinitionId": "invoice-assign-approver:1:4c864d79-579d-11e5-9848-f0def1e59da8", + "decisionDefinitionKey": "invoice-assign-approver", + "decisionDefinitionName": "Assign Approver", + "evaluationTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "id": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "inputs": [ + { + "clauseId": "clause1", + "clauseName": "Invoice Amount", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c41-579d-11e5-9848-f0def1e59da8", + "type": "Double", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": 123.0, + "valueInfo": {} + }, + { + "clauseId": "clause2", + "clauseName": "Invoice Category", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c40-579d-11e5-9848-f0def1e59da8", + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "Misc", + "valueInfo": {} + } + ], + "outputs": [ + { + "clauseId": "clause3", + "clauseName": "Approver Group", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c42-579d-11e5-9848-f0def1e59da8", + "ruleId": "DecisionRule_1of5a87", + "ruleOrder": 1, + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "accounting", + "valueInfo": {}, + "variableName": "result" + } + ], + "processDefinitionId": "invoice:1:4c6e3197-579d-11e5-9848-f0def1e59da8", + "processDefinitionKey": "invoice", + "processInstanceId": "67e98fec-579d-11e5-9848-f0def1e59da8", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "caseDefinitionId": null, + "caseDefinitionKey": null, + "caseInstanceId": null, + "tenantId": null, + "userId": null, + "rootDecisionInstanceId": null, + "decisionRequirementsDefinitionId": null, + "decisionRequirementsDefinitionKey": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/decision-instance/count": { + "get": { + "operationId": "getHistoricDecisionInstancesCount", + "tags": [ + "Historic Decision Instance" + ], + "summary": "Get Historic Decision Instance Count", + "description": "Queries for the number of historic decision instances that fulfill the given parameters. \nTakes the same parameters as the \n[Get Historic Decision Instances](https://docs.camunda.org/manual/7.22/reference/rest/history/decision-instance/get-decision-instance-query/) \nmethod.", + "parameters": [ + { + "name": "decisionInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision instance id." + }, + { + "name": "decisionInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by decision instance ids. Must be a comma-separated list of decision instance ids." + }, + { + "name": "decisionDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision definitions the instances belongs to. Must be a\ncomma-separated list of decision definition ids." + }, + { + "name": "decisionDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the keys of the decision definition the instances belongs to. Must be a comma-\nseparated list of decision definition keys." + }, + { + "name": "decisionDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition the instances belongs to." + }, + { + "name": "decisionDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the decision definition the instances belongs to, that the parameter\nis a substring of." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the instances belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances belongs to." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process instance the instances belongs to." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case definition the instances belongs to." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the case definition the instances belongs to." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case instance the instances belongs to." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity ids the instances belongs to.\nMust be a comma-separated list of acitvity ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the activity instance ids the instances belongs to.\nMust be a comma-separated list of acitvity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A historic decision instance must have one\nof the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic decision instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "evaluatedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were evaluated before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "evaluatedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were evaluated after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that were evaluated by the given user." + }, + { + "name": "rootDecisionInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have a given root decision instance id.\nThis also includes the decision instance with the given id." + }, + { + "name": "rootDecisionInstancesOnly", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances those are the root decision instance of an evaluation.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "decisionRequirementsDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the decision requirements definition the instances belongs to." + }, + { + "name": "decisionRequirementsDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the decision requirements definition the instances belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/decision-instance/count`", + "value": { + "count": 4 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/decision-instance/delete": { + "post": { + "operationId": "deleteAsync", + "tags": [ + "Historic Decision Instance" + ], + "summary": "Delete Async (POST)", + "description": "Delete multiple historic decision instances asynchronously (batch).\nAt least `historicDecisionInstanceIds` or `historicDecisionInstanceQuery` \nhas to be provided. If both are provided then all instances matching query \ncriterion and instances from the list will be deleted.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteHistoricDecisionInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/decision-instance/delete`", + "description": "POST `/history/decision-instance/delete`", + "value": { + "historicDecisionInstanceIds": [ + "aDecision", + "secondDecision" + ], + "historicDecisionInstanceQuery": { + "decisionDefinitionKey": "a-definition-key" + }, + "deleteReason": "a delete reason" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/decision-instance/delete`", + "description": "POST `/history/decision-instance/delete`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspened": false, + "tenantId": null, + "createUserId": "aUser" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, i.e. neither\n`historicDecisionInstanceIds` nor `historicDecisionInstanceQuery` is\npresent. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) \nfor the error response format." + } + } + } + }, + "/history/decision-instance/set-removal-time": { + "post": { + "operationId": "setRemovalTimeAsyncHistoricDecisionInstance", + "tags": [ + "Historic Decision Instance" + ], + "summary": "Set Removal Time Async (POST)", + "description": "Sets the removal time to multiple historic decision instances asynchronously\n(batch).\n\nAt least `historicDecisionInstanceIds` or\n`historicDecisionInstanceQuery` has to be provided. If both are\nprovided, all instances matching query criterion and instances from the list\nwill be updated with a removal time.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetRemovalTimeToHistoricDecisionInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/decision-instance/set-removal-time`", + "description": "POST `/history/decision-instance/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "hierarchical": true, + "historicDecisionInstanceQuery": { + "evaluatedBefore": "2019-09-05T17:02:10.123+0200" + }, + "historicDecisionInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/decision-instance/set-removal-time`", + "description": "POST `/history/decision-instance/set-removal-time`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "decision-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "suspended": false, + "tenantId": "accounting", + "createUserId": "demo-user" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Request was unsuccessfull due to a bad user request. This occurs if\nsome of the query parameters are invalid, e. g. if neither\nhistoricDecisionInstances nor historicDecisionInstanceQuery is\npresent or if no mode is specified.\n\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/decision-instance/{id}": { + "get": { + "operationId": "getHistoricDecisionInstance", + "tags": [ + "Historic Decision Instance" + ], + "summary": "Get Historic Decision Instance", + "description": "Retrieves a historic decision instance by id, according to the \n`HistoricDecisionInstance` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic decision instance to be retrieved." + }, + { + "name": "includeInputs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include input values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "includeOutputs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include output values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "disableBinaryFetching", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Disables fetching of byte array input and output values.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "disableCustomObjectDeserialization", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Disables deserialization of input and output values that are custom objects.\nValue may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricDecisionInstanceDto" + }, + "examples": { + "example-1": { + "summary": "request including inputs and outputs", + "description": "GET `/history/decision-instance/aDecisionInstId?includeInput\u003dtrue\u0026includeOutputs\u003dtrue`", + "value": { + "activityId": "assignApprover", + "activityInstanceId": "assignApprover:67e9de1e-579d-11e5-9848-f0def1e59da8", + "collectResultValue": null, + "decisionDefinitionId": "invoice-assign-approver:1:4c864d79-579d-11e5-9848-f0def1e59da8", + "decisionDefinitionKey": "invoice-assign-approver", + "decisionDefinitionName": "Assign Approver", + "evaluationTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "id": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "inputs": [ + { + "clauseId": "clause1", + "clauseName": "Invoice Amount", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c41-579d-11e5-9848-f0def1e59da8", + "type": "Double", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": 123.0, + "valueInfo": {} + }, + { + "clauseId": "clause2", + "clauseName": "Invoice Category", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c40-579d-11e5-9848-f0def1e59da8", + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "Misc", + "valueInfo": {} + } + ], + "outputs": [ + { + "clauseId": "clause3", + "clauseName": "Approver Group", + "decisionInstanceId": "67ea2c3f-579d-11e5-9848-f0def1e59da8", + "errorMessage": null, + "id": "67ea2c42-579d-11e5-9848-f0def1e59da8", + "ruleId": "DecisionRule_1of5a87", + "ruleOrder": 1, + "type": "String", + "createTime": "2015-09-10T11:22:06.000+0200", + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "value": "accounting", + "valueInfo": {}, + "variableName": "result" + } + ], + "processDefinitionId": "invoice:1:4c6e3197-579d-11e5-9848-f0def1e59da8", + "processDefinitionKey": "invoice", + "processInstanceId": "67e98fec-579d-11e5-9848-f0def1e59da8", + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "caseDefinitionId": null, + "caseDefinitionKey": null, + "caseInstanceId": null, + "tenantId": null, + "userId": null, + "rootDecisionInstanceId": null, + "decisionRequirementsDefinitionId": null, + "decisionRequirementsDefinitionKey": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic decision instance with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/decision-requirements-definition/{id}/statistics": { + "get": { + "operationId": "getDecisionStatistics", + "tags": [ + "Historic Decision Requirements Definition" + ], + "summary": "Get DRD Statistics", + "description": "Retrieves evaluation statistics of a given decision requirements definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the decision requirements definition." + }, + { + "name": "decisionInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query results to be based only on specific evaluation\ninstance of a given decision requirements definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricDecisionInstanceStatisticsDto" + } + }, + "examples": { + "example-1": { + "summary": "request", + "description": "GET `/history/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/statistics`", + "value": [ + { + "decisionDefinitionKey": "dish-decision", + "evaluations": 1 + } + ] + }, + "example-2": { + "summary": "request with decisionInstanceId", + "description": "GET `/history/decision-requirements-definition/invoice:1:9f86d61f-9ee5-11e3-be3b-606720b6f99c/statistics?decisionInstanceId\u003d17`", + "value": [ + { + "decisionDefinitionKey": "dish-decision", + "evaluations": 1 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/detail": { + "get": { + "operationId": "getHistoricDetails", + "tags": [ + "Historic Detail" + ], + "summary": "Get Historic Details", + "description": "Queries for historic details that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Historic Detail Count](https://docs.camunda.org/manual/7.22/reference/rest/history/detail/get-detail-query-count/) method.", + "parameters": [ + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic details which belong to one of the passed comma-separated process instance ids." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by execution id." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by task id." + }, + { + "name": "activityInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity instance id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case execution id." + }, + { + "name": "variableInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable instance id." + }, + { + "name": "variableTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic details where the variable updates belong to one of the passed comma-separated\nlist of variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type `serializable`." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable name like. Example usage: `variableNameLike(%camunda%)`. The query will match the names of variables in a case-insensitive way." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic details that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "userOperationId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a user operation id." + }, + { + "name": "formFields", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include `HistoricFormFields`. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "variableUpdates", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include `HistoricVariableUpdates`. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "excludeTaskDetails", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Excludes all task-related `HistoricDetails`, so only items which have no task id set will be selected.\nWhen this parameter is used together with `taskId`, this call is ignored and task details are not excluded.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "initial", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to historic variable updates that contain only initial variable values.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "occurredBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to historic details that occured before the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "occurredAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to historic details that occured after the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "processInstanceId", + "variableName", + "variableType", + "variableRevision", + "formPropertyId", + "time", + "occurrence", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricDetailDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail?processInstanceId\u003d3cd597b7-001a-11e7-8c6b-34f39ab71d4e`", + "description": "GET `/history/detail?processInstanceId\u003d3cd597b7-001a-11e7-8c6b-34f39ab71d4e`", + "value": [ + { + "type": "variableUpdate", + "id": "3cd79390-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "amount", + "variableInstanceId": "3cd65b08-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "Double", + "value": 30.0, + "valueInfo": {}, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + }, + { + "type": "variableUpdate", + "id": "3cd79392-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "invoiceDocument", + "variableInstanceId": "3cd65b0a-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "File", + "value": null, + "valueInfo": { + "mimeType": "application/pdf", + "filename": "invoice.pdf" + }, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricDetails", + "tags": [ + "Historic Detail" + ], + "summary": "Get Historic Details (POST)", + "description": "Queries for historic details that fulfill the given parameters. This method is slightly more\npowerful than the [Get Historic Details](https://docs.camunda.org/manual/7.22/reference/rest/history/detail/get-detail-query/)\nmethod because it allows sorting by multiple parameters. The size of the result set can be retrieved by\nusing the [Get Historic Detail Count](https://docs.camunda.org/manual/7.22/reference/rest/history/detail/get-detail-query-count/)\nmethod.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricDetailQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/detail?firstResult\u003d1\u0026maxResults\u003d10`", + "description": "POST `/history/detail?firstResult\u003d1\u0026maxResults\u003d10`", + "value": { + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "occurredAfter": "2018-01-29T10:15:45.000+0100", + "sorting": [ + { + "sortBy": "processInstanceId", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricDetailDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/history/detail?firstResult\u003d1\u0026maxResults\u003d10`", + "description": "POST `/history/detail?firstResult\u003d1\u0026maxResults\u003d10`", + "value": [ + { + "type": "variableUpdate", + "id": "3cd79390-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "amount", + "variableInstanceId": "3cd65b08-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "Double", + "value": 30.0, + "valueInfo": {}, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + }, + { + "type": "variableUpdate", + "id": "3cd79392-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "invoiceDocument", + "variableInstanceId": "3cd65b0a-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "File", + "value": null, + "valueInfo": { + "mimeType": "application/pdf", + "filename": "invoice.pdf" + }, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/detail/count": { + "get": { + "operationId": "getHistoricDetailsCount", + "tags": [ + "Historic Detail" + ], + "summary": "Get Historic Detail Count", + "description": "Queries for the number of historic details that fulfill the given parameters.\nTakes the same parameters as the [Get Historic\nDetails](https://docs.camunda.org/manual/7.22/reference/rest/history/detail/get-detail-query/)\nmethod.", + "parameters": [ + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic details which belong to one of the passed comma-separated process instance ids." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by execution id." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by task id." + }, + { + "name": "activityInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by activity instance id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case execution id." + }, + { + "name": "variableInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable instance id." + }, + { + "name": "variableTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic details where the variable updates belong to one of the passed comma-separated\nlist of variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type `serializable`." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable name like. Example usage: `variableNameLike(%camunda%)`. The query will match the names of variables in a case-insensitive way." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic details that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "userOperationId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a user operation id." + }, + { + "name": "formFields", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include `HistoricFormFields`. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "variableUpdates", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include `HistoricVariableUpdates`. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "excludeTaskDetails", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Excludes all task-related `HistoricDetails`, so only items which have no task id set will be selected.\nWhen this parameter is used together with `taskId`, this call is ignored and task details are not excluded.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "initial", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to historic variable updates that contain only initial variable values.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "occurredBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to historic details that occured before the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "occurredAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to historic details that occured after the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail/count?variableName\u003dmy_variable`", + "description": "GET `/history/detail/count?variableName\u003dmy_variable`", + "value": { + "count": 3 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid." + } + } + } + }, + "/history/detail/{id}": { + "get": { + "operationId": "historicDetail", + "tags": [ + "Historic Detail" + ], + "summary": "Get Historic Detail", + "description": "Retrieves a historic detail by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the detail." + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically\nvariables that store custom Java objects) should be deserialized\non server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on\nserver side and transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean\nproperty introspection feature. Note that this requires the Java\nclasses of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its\nserialized format. For example, a variable that is serialized as\nXML will be returned as a JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of\nbackward compatibility, we recommend setting this parameter to\n`false` when developing web applications that are independent of\nthe Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricDetailDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail/3cd79390-001a-11e7-8c6b-34f39ab71d4e`", + "description": "GET `/history/detail/3cd79390-001a-11e7-8c6b-34f39ab71d4e`", + "value": { + "type": "variableUpdate", + "id": "3cd79390-001a-11e7-8c6b-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionId": "invoice:1:3c59899b-001a-11e7-8c6b-34f39ab71d4e", + "processInstanceId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "activityInstanceId": "StartEvent_1:3cd7456e-001a-11e7-8c6b-34f39ab71d4e", + "executionId": "3cd597b7-001a-11e7-8c6b-34f39ab71d4e", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "userOperationId": "3cd76c7f-001a-11e7-8c6b-34f39ab71d4e", + "time": "2017-03-03T15:03:54.000+0200", + "variableName": "amount", + "variableInstanceId": "3cd65b08-001a-11e7-8c6b-34f39ab71d4e", + "variableType": "Double", + "value": 30.0, + "valueInfo": {}, + "revision": 0, + "errorMessage": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "initial": true + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/detail/{id}/data": { + "get": { + "operationId": "historicDetailBinary", + "tags": [ + "Historic Detail" + ], + "summary": "Get Historic Detail (Binary)", + "description": "Retrieves the content of a historic variable update by id. Applicable for byte\narray and file variables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic variable update." + } + ], + "responses": { + "200": { + "description": "Request successful.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail/someId/data`", + "value": "binary variable: Status 200. Content-Type: application/octet-stream" + } + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type. Additionally,\n for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "GET `/history/detail/someId/data`", + "value": "file variable: Status 200. Content-Type: text/plain; charset\u003dUTF-8.\n Content-Disposition: attachment; filename\u003d\u0027someFile.txt\u0027" + } + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Detail with given id exists but is not a binary variable. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Detail with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/external-task-log": { + "get": { + "operationId": "getHistoricExternalTaskLogs", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Logs", + "description": "Queries for historic external task logs that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get External Task Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/external-task-log/get-external-task-log-query-count/)\nmethod.", + "parameters": [ + { + "name": "logId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by historic external task log id." + }, + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by external task id." + }, + { + "name": "topicName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task topic." + }, + { + "name": "workerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + { + "name": "errorMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by external task exception message." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity\ninstance ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed execution ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task log entries which belong to one of the passed and\ncomma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic external task log entries that belong to no tenant. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated external task had a priority lower than or\nequal to the given value. Value must be a valid `long` value." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated external task had a priority higher than or\nequal to the given value. Value must be a valid `long` value." + }, + { + "name": "creationLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "failureLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "successLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "deletionLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "timestamp", + "externalTaskId", + "topicName", + "workerId", + "retries", + "priority", + "activityId", + "activityInstanceId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricExternalTaskLogDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/external-task-log?externalTaskId\u003danExternalTaskId`", + "description": "GET `/history/external-task-log?externalTaskId\u003danExternalTaskId`", + "value": [ + { + "id": "someId", + "timestamp": "2017-01-15T15:22:20.000+0200", + "externalTaskId": "anExternalTaskId", + "topicName": "aTopicName", + "workerId": "aWorkerId", + "retries": 3, + "priority": 5, + "errorMessage": "An error occured!", + "activityId": "externalServiceTask", + "activityInstanceId": "externalServiceTask:15", + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "tenantId": null, + "creationLog": false, + "failureLog": true, + "successLog": false, + "deletionLog": false, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricExternalTaskLogs", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Logs (POST)", + "description": "Queries for historic external task logs that fulfill the given parameters.\nThis method is slightly more powerful than the\n[Get External Task Logs](https://docs.camunda.org/manual/7.22/reference/rest/history/external-task-log/get-external-task-log-query/)\nmethod because it allows filtering by historic external task logs\nvalues of the different types `String`, `Number` or `Boolean`.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricExternalTaskLogQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/external-task-log`", + "value": { + "externalTaskId": "anExternalTaskId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricExternalTaskLogDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/history/external-task-log`", + "description": "POST `/history/external-task-log`", + "value": [ + { + "id": "someId", + "timestamp": "2017-01-15T15:22:20.000+0200", + "externalTaskId": "anExternalTaskId", + "topicName": "aTopicName", + "workerId": "aWorkerId", + "retries": 3, + "priority": 5, + "errorMessage": "An error occured!", + "activityId": "externalServiceTask", + "activityInstanceId": "externalServiceTask:15", + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "tenantId": null, + "creationLog": false, + "failureLog": true, + "successLog": false, + "deletionLog": false, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/external-task-log/count": { + "get": { + "operationId": "getHistoricExternalTaskLogsCount", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Log Count", + "description": "Queries for the number of historic external task logs that fulfill the given\nparameters.\nTakes the same parameters as the\n[Get External Task Logs](https://docs.camunda.org/manual/7.22/reference/rest/history/external-task-log/get-external-task-log-query/)\nmethod.", + "parameters": [ + { + "name": "logId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by historic external task log id." + }, + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by external task id." + }, + { + "name": "topicName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by an external task topic." + }, + { + "name": "workerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + { + "name": "errorMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by external task exception message." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity\ninstance ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed execution ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic external task log entries which belong to one of the passed and\ncomma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic external task log entries that belong to no tenant. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated external task had a priority lower than or\nequal to the given value. Value must be a valid `long` value." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated external task had a priority higher than or\nequal to the given value. Value must be a valid `long` value." + }, + { + "name": "creationLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "failureLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "successLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "deletionLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/external-task-log/count?externalTaskId\u003danExternalTaskId`", + "description": "GET `/history/external-task-log/count?externalTaskId\u003danExternalTaskId`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid." + } + } + }, + "post": { + "operationId": "queryHistoricExternalTaskLogsCount", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Log Count (POST)", + "description": "Queries for the number of historic external task logs that fulfill the given\nparameters.\nThis method takes the same message body as the\n[Get External Task Logs (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/external-task-log/post-external-task-log-query/)\nmethod and therefore it is slightly more powerful than the\n[Get External Task Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/external-task-log/get-external-task-log-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricExternalTaskLogQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/external-task-log/count`", + "value": { + "externalTaskId": "anExternalTaskId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/external-task-log/count`", + "description": "POST `/history/external-task-log/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/external-task-log/{id}": { + "get": { + "operationId": "getHistoricExternalTaskLog", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Log", + "description": "Retrieves a historic external task log by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the log entry." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricExternalTaskLogDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/external-task-log/someId`", + "value": { + "id": "someId", + "timestamp": "2017-01-15T15:22:20.000+0200", + "externalTaskId": "anExternalTaskId", + "topicName": "aTopicName", + "workerId": "aWorkerId", + "retries": 3, + "priority": 5, + "errorMessage": "An error occured!", + "activityId": "externalServiceTask", + "activityInstanceId": "externalServiceTask:15", + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "tenantId": null, + "creationLog": false, + "failureLog": true, + "successLog": false, + "deletionLog": false, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic external task log with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/external-task-log/{id}/error-details": { + "get": { + "operationId": "getErrorDetailsHistoricExternalTaskLog", + "tags": [ + "Historic External Task Log" + ], + "summary": "Get External Task Log Error Details", + "description": "Retrieves the corresponding error details of the passed historic external task log\nby id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic external task log to get the error details for." + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": {}, + "examples": { + "example-1": { + "summary": "GET `history/external-task-log/someId/error-details`", + "description": "GET `history/external-task-log/someId/error-details`", + "value": "java.lang.RuntimeException: A exception message!\n at org.camunda.bpm.pa.service.FailingDelegate.execute(FailingDelegate.java:10)\n at org.camunda.bpm.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34)\n at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)\n ..." + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic external task log with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/identity-link-log": { + "get": { + "operationId": "getHistoricIdentityLinks", + "tags": [ + "Historic Identity Link Log" + ], + "summary": "Get Identity Link Logs", + "description": "Queries for historic identity link logs that fulfill given parameters.\nThe size of the result set can be retrieved by using the\n[Get Identity-Link-Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/identity-links/get-identity-link-query-count/)\nmethod.", + "parameters": [ + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given type (candidate/assignee/owner)." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given user id." + }, + { + "name": "groupId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given group id." + }, + { + "name": "dateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to identity links that have the time before the given time." + }, + { + "name": "dateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to identity links that have the time after the given time." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given task id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given process definition key." + }, + { + "name": "operationType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given operationType (add/delete)." + }, + { + "name": "assignerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given assigner id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic identity links that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "time", + "type", + "userId", + "groupId", + "taskId", + "processDefinitionId", + "processDefinitionKey", + "operationType", + "assignerId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricIdentityLinkLogDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/identity-link-log?taskId\u003daTaskId`", + "description": "GET `/history/identity-link-log?taskId\u003daTaskId`", + "value": [ + { + "id": "1", + "time": "2014-03-01T08:00:00.000+0200", + "type": "candidate", + "userId": "aUserId", + "groupId": "aGroupId", + "taskId": "aTaskId", + "processDefinitionId": "12", + "operationType": "add", + "assignerId": "aAssignerId", + "processDefinitionKey": "oneTaskProcess", + "tenantId": "tenant1", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "2", + "time": "2014-03-05T10:00:00.000+0200", + "type": "candidate", + "userId": "aUserId", + "groupId": "aGroupId", + "taskId": "aTaskId", + "processDefinitionId": "12", + "operationType": "delete", + "assignerId": "aAssignerId", + "processDefinitionKey": "oneTaskProcess", + "tenantId": "tenant1", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/identity-link-log/count": { + "get": { + "operationId": "getHistoricIdentityLinksCount", + "tags": [ + "Historic Identity Link Log" + ], + "summary": "Get Identity Link Log Count", + "description": "Queries for the number of historic identity link logs that fulfill the given\nparameters. Takes the same parameters as the\n[Get Identity-Link-Logs](https://docs.camunda.org/manual/7.22/reference/rest/history/identity-links/get-identity-link-query/)\nmethod.", + "parameters": [ + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given type (candidate/assignee/owner)." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given user id." + }, + { + "name": "groupId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given group id." + }, + { + "name": "dateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to identity links that have the time before the given time." + }, + { + "name": "dateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to identity links that have the time after the given time." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given task id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given process definition key." + }, + { + "name": "operationType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given operationType (add/delete)." + }, + { + "name": "assignerId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to identity links that have the given assigner id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic identity links that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/identity-link-log/count?taskId\u003daTaskId`", + "description": "GET `/history/identity-link-log/count?taskId\u003daTaskId`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/incident": { + "get": { + "operationId": "getHistoricIncidents", + "tags": [ + "Historic Incident" + ], + "summary": "Get Incidents", + "description": "Queries for historic incidents that fulfill given parameters.\nThe size of the result set can be retrieved by using the\n[Get Incident Count](https://docs.camunda.org/manual/7.22/reference/rest/history/incident/get-incident-query-count/)\nmethod.", + "parameters": [ + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to the given incident type. See the [User\nGuide](/manual/develop/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident message." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that incidents message is a substring of the given value.\nThe string can include the wildcard character \u0027%\u0027 to express\nlike-strategy: starts with (string%), ends with (%string) or contains\n(%string%).\n" + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given processDefinitionKey." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given process definition keys." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process instance with the given id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an execution with the given id." + }, + { + "name": "createTimeBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have a createTime date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "createTimeAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have a createTime date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "endTimeBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an endTimeBefore date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "endTimeAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an endTimeAfter date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an activity with the given id." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that were created due to the failure of an activity with the given\nid." + }, + { + "name": "causeIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as cause incident." + }, + { + "name": "rootCauseIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as root cause incident." + }, + { + "name": "configuration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as configuration." + }, + { + "name": "historyConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as history configuration." + }, + { + "name": "open", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are open." + }, + { + "name": "resolved", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are resolved." + }, + { + "name": "deleted", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are deleted." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic incidents that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "jobDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated job definition ids." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "incidentId", + "incidentMessage", + "createTime", + "endTime", + "incidentType", + "executionId", + "activityId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "causeIncidentId", + "rootCauseIncidentId", + "configuration", + "historyConfiguration", + "tenantId", + "incidentState" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricIncidentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/incident?processInstanceId\u003daProcInstId`", + "description": "GET `/history/incident?processInstanceId\u003daProcInstId`", + "value": [ + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "createTime": "2014-03-01T08:00:00.000+0200", + "endTime": null, + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "incidentMessage": "anIncidentMessage", + "tenantId": null, + "jobDefinitionId": "aJobDefinitionId", + "open": true, + "deleted": false, + "resolved": false, + "removalTime": null, + "rootProcessInstanceId": "aRootProcessInstanceId", + "annotation": "an annotation" + }, + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anotherExecutionId", + "createTime": "2014-03-01T08:00:00.000+0200", + "endTime": "2014-03-10T12:00:00.000+0200", + "incidentType": "customIncidentType", + "activityId": "userTask", + "failedActivityId": "userTask", + "causeIncidentId": "anotherCauseIncidentId", + "rootCauseIncidentId": "anotherRootCauseIncidentId", + "configuration": "anotherConfiguration", + "incidentMessage": "anotherIncidentMessage", + "tenantId": null, + "jobDefinitionId": null, + "open": false, + "deleted": false, + "resolved": true, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "annotation": "another annotation" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/incident/count": { + "get": { + "operationId": "getHistoricIncidentsCount", + "tags": [ + "Historic Incident" + ], + "summary": "Get Incident Count", + "description": "Queries for the number of historic incidents that fulfill the given parameters.\nTakes the same parameters as the\n[Get Incidents](https://docs.camunda.org/manual/7.22/reference/rest/history/incident/get-incident-query/)\nmethod.", + "parameters": [ + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to the given incident type. See the [User\nGuide](/manual/develop/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident message." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that incidents message is a substring of the given value.\nThe string can include the wildcard character \u0027%\u0027 to express\nlike-strategy: starts with (string%), ends with (%string) or contains\n(%string%).\n" + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given processDefinitionKey." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given process definition keys." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process instance with the given id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an execution with the given id." + }, + { + "name": "createTimeBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have a createTime date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "createTimeAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have a createTime date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "endTimeBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an endTimeBefore date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "endTimeAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an endTimeAfter date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an activity with the given id." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that were created due to the failure of an activity with the given\nid." + }, + { + "name": "causeIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as cause incident." + }, + { + "name": "rootCauseIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as root cause incident." + }, + { + "name": "configuration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as configuration." + }, + { + "name": "historyConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as history configuration." + }, + { + "name": "open", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are open." + }, + { + "name": "resolved", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are resolved." + }, + { + "name": "deleted", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restricts to incidents that are deleted." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic incidents that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "jobDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated job definition ids." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/incident/count?processInstanceId\u003daProcInstId`", + "description": "GET `/history/incident/count?processInstanceId\u003daProcInstId`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/job-log": { + "get": { + "operationId": "getHistoricJobLogs", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Logs", + "description": "Queries for historic job logs that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Job Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/job-log/get-job-log-query-count/)\nmethod.", + "parameters": [ + { + "name": "logId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by historic job log id." + }, + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobExceptionMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job exception message." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "jobDefinitionType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job definition types." + }, + { + "name": "jobDefinitionConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition configuration." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed activity ids." + }, + { + "name": "failedActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to failures of one of the passed activity ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed execution ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job log entries which belong to one of the passed and comma-\nseparated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic job log entries that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "hostname", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by hostname." + }, + { + "name": "jobPriorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated job had a priority lower than or equal to the\ngiven value. Value must be a valid `long` value." + }, + { + "name": "jobPriorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated job had a priority higher than or equal to the\ngiven value. Value must be a valid `long` value." + }, + { + "name": "creationLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "failureLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "successLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "deletionLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "timestamp", + "jobId", + "jobDefinitionId", + "jobDueDate", + "jobRetries", + "jobPriority", + "activityId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "deploymentId", + "hostname", + "occurrence", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricJobLogDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/job-log?jobId\u003daJobId`", + "description": "GET `/history/job-log?jobId\u003daJobId`", + "value": [ + { + "id": "someId", + "timestamp": "2015-01-15T15:22:20.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "jobId": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "activityId": "serviceTask", + "jobType": "message", + "jobHandlerType": "async-continuation", + "jobDueDate": null, + "jobRetries": 3, + "jobPriority": 15, + "jobExceptionMessage": null, + "failedActivityId": null, + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "deploymentId": "aDeploymentId", + "rootProcessInstanceId": "aRootProcessInstanceId", + "tenantId": null, + "hostname": "aHostname", + "batchId": "aBatchId", + "creationLog": true, + "failureLog": false, + "successLog": false, + "deletionLog": false + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricJobLogs", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Logs (POST)", + "description": "Queries for historic job logs that fulfill the given parameters.\nThis method is slightly more powerful than the\n[Get Job Logs](https://docs.camunda.org/manual/7.22/reference/rest/history/job-log/get-job-log-query/)\nmethod because it allows filtering by historic job logs values of the\ndifferent types `String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricJobLogQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/job-log`", + "value": { + "jobId": "aJobId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricJobLogDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/history/job-log`", + "description": "POST `/history/job-log`", + "value": [ + { + "id": "someId", + "timestamp": "2015-01-15T15:22:20.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "jobId": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "activityId": "serviceTask", + "jobType": "message", + "jobHandlerType": "async-continuation", + "jobDueDate": null, + "jobRetries": 3, + "jobPriority": 15, + "jobExceptionMessage": null, + "failedActivityId": null, + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "deploymentId": "aDeploymentId", + "rootProcessInstanceId": "aRootProcessInstanceId", + "tenantId": null, + "hostname": "aHostname", + "batchId": "aBatchId", + "creationLog": true, + "failureLog": false, + "successLog": false, + "deletionLog": false + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/job-log/count": { + "get": { + "operationId": "getHistoricJobLogsCount", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Log Count", + "description": "Queries for the number of historic job logs that fulfill the given parameters.\nTakes the same parameters as the\n[Get Job Logs](https://docs.camunda.org/manual/7.22/reference/rest/history/job-log/get-job-log-query/)\nmethod.", + "parameters": [ + { + "name": "logId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by historic job log id." + }, + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobExceptionMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job exception message." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "jobDefinitionType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job definition types." + }, + { + "name": "jobDefinitionConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition configuration." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed activity ids." + }, + { + "name": "failedActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to failures of one of the passed activity ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed execution ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic job log entries which belong to one of the passed and comma-\nseparated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic job log entries that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "hostname", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by hostname." + }, + { + "name": "jobPriorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated job had a priority lower than or equal to the\ngiven value. Value must be a valid `long` value." + }, + { + "name": "jobPriorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include logs for which the associated job had a priority higher than or equal to the\ngiven value. Value must be a valid `long` value." + }, + { + "name": "creationLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "failureLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "successLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "deletionLog", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/job-log/count?jobId\u003daJobId`", + "description": "GET `/history/job-log/count?jobId\u003daJobId`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid." + } + } + }, + "post": { + "operationId": "queryHistoricJobLogsCount", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Log Count (POST)", + "description": "Queries for the number of historic job logs that fulfill the given parameters.\nThis method takes the same message body as the\n[Get Job Logs (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/job-log/post-job-log-query/)\nmethod and therefore it is slightly more powerful than the\n[Get Job Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/job-log/get-job-log-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricJobLogQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/job-log/count`", + "value": { + "jobId": "aJobId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/job-log/count`", + "description": "POST `/history/job-log/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/job-log/{id}": { + "get": { + "operationId": "getHistoricJobLog", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Log", + "description": "Retrieves a historic job log by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the log entry." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricJobLogDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/job-log/someId`", + "value": { + "id": "someId", + "timestamp": "2015-01-15T15:22:20.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "jobId": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "activityId": "serviceTask", + "jobType": "message", + "jobHandlerType": "async-continuation", + "jobDueDate": null, + "jobRetries": 3, + "jobPriority": 15, + "jobExceptionMessage": null, + "failedActivityId": null, + "executionId": "anExecutionId", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "deploymentId": "aDeploymentId", + "rootProcessInstanceId": "aRootProcessInstanceId", + "tenantId": null, + "hostname": "aHostname", + "batchId": "aBatchId", + "creationLog": true, + "failureLog": false, + "successLog": false, + "deletionLog": false + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic job log with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/job-log/{id}/stacktrace": { + "get": { + "operationId": "getStacktraceHistoricJobLog", + "tags": [ + "Historic Job Log" + ], + "summary": "Get Job Log Exception Stacktrace", + "description": "Retrieves the corresponding exception stacktrace to the passed historic job log by\nid.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic job log to get the exception stacktrace for." + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": {}, + "examples": { + "example-1": { + "summary": "response", + "description": "GET `history/job-log/someId/stacktrace`\n\n The result is the corresponding stacktrace as plain text.", + "value": "java.lang.RuntimeException: A exception message!\n at org.camunda.bpm.pa.service.FailingDelegate.execute(FailingDelegate.java:10)\n at org.camunda.bpm.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34)\n at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)\n ..." + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Historic job log with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/process-definition/cleanable-process-instance-report": { + "get": { + "operationId": "getCleanableHistoricProcessInstanceReport", + "tags": [ + "Historic Process Definition" + ], + "summary": "Get Cleanable Process Instance Report", + "description": "Retrieves a report about a process definition and finished process instances\nrelevant to history cleanup (see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)) \nso that you can tune the history time to live.\nThese reports include the count of the finished historic process\ninstances, cleanable process instances and basic process definition\ndata - id, key, name and version.\nThe size of the result set can be retrieved by using the\n[Get Cleanable Process Instance Report Count](https://docs.camunda.org/manual/7.22/reference/rest/history/process-definition/get-cleanable-process-instance-report-count/)\nmethod.", + "parameters": [ + { + "name": "processDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition ids. Must be a comma-separated list of process definition ids." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition keys. Must be a comma-separated list of process definition keys." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A process definition must have one of the given \ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions which belong to no tenant. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "compact", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have more than zero finished instances. Value may\nonly be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "finished" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CleanableHistoricProcessInstanceReportResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/process-definition/cleanable-process-instance-report`", + "description": "GET `/history/process-definition/cleanable-process-instance-report`", + "value": [ + { + "processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt", + "processDefinitionVersion": 1, + "historyTimeToLive": 5, + "finishedProcessInstanceCount": 100, + "cleanableProcessInstanceCount": 53, + "tenantId": "aTenantId" + }, + { + "processDefinitionId": "invoice:2:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt v2.0", + "processDefinitionVersion": 2, + "historyTimeToLive": 5, + "finishedProcessInstanceCount": 1000, + "cleanableProcessInstanceCount": 13, + "tenantId": "aTenantId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/process-definition/cleanable-process-instance-report/count": { + "get": { + "operationId": "getCleanableHistoricProcessInstanceReportCount", + "tags": [ + "Historic Process Definition" + ], + "summary": "Get Cleanable Process Instance Report Count", + "description": "Queries for the number of report results about a process definition and finished\nprocess instances relevant to history cleanup (see\n[History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)).\nTakes the same parameters as the\n[Get Cleanable Process Instance Report](https://docs.camunda.org/manual/7.22/reference/rest/history/process-definition/get-cleanable-process-instance-report/)\nmethod.", + "parameters": [ + { + "name": "processDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition ids. Must be a comma-separated list of process definition ids." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition keys. Must be a comma-separated list of process definition keys." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A process definition must have one of the given \ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions which belong to no tenant. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "compact", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have more than zero finished instances. Value may\nonly be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/process-definition/cleanable-process-instance-report/count`", + "description": "GET `/history/process-definition/cleanable-process-instance-report/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/process-definition/{id}/statistics": { + "get": { + "operationId": "getHistoricActivityStatistics", + "tags": [ + "Historic Process Definition" + ], + "summary": "Get Historic Activity Statistics", + "description": "Retrieves historic statistics of a given process definition, grouped by activities.\nThese statistics include the number of running activity instances and,\noptionally, the number of canceled activity instances, finished\nactivity instances and activity instances which completed a scope\n(i.e., in BPMN 2.0 manner: a scope is completed by an activity\ninstance when the activity instance consumed a token but did not emit\na new token).\n**Note:** This only includes historic data.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + }, + { + "name": "canceled", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of canceled activity instances in the result or not. Valid\nvalues are `true` or `false`. Default: `false`." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of finished activity instances in the result or not. Valid\nvalues are `true` or `false`. Default: `false`." + }, + { + "name": "completeScope", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of activity instances which completed a scope in the result\nor not. Valid values are `true` or `false`. Default: `false`." + }, + { + "name": "incidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of incidents. Valid values are `true` or `false`. Default: `false`." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to process instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), \nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, \ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to process instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), \nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, \ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to process instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), \nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, \ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to process instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), \nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, \ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to process instances with the given IDs. The IDs must be provided as a comma-\nseparated list." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "activityId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricActivityStatisticsDto" + } + }, + "examples": { + "example-1": { + "summary": "Request With `canceled\u003dtrue`", + "description": "GET `history/process-definition/aProcessDefinitionId/statistics?canceled\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "canceled": 50, + "finished": 0, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + }, + { + "id": "anotherActivity", + "instances": 200, + "canceled": 150, + "finished": 0, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + } + ] + }, + "example-2": { + "summary": "Request With `finished\u003dtrue`", + "description": "GET `history/process-definition/aProcessDefinitionId/statistics?finished\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "canceled": 0, + "finished": 20, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + }, + { + "id": "anotherActivity", + "instances": 200, + "canceled": 0, + "finished": 30, + "completeScope": 0, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + } + ] + }, + "example-3": { + "summary": "Request With `completeScope\u003dtrue`", + "description": "GET `history/process-definition/aProcessDefinitionId/statistics?completeScope\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "canceled": 0, + "finished": 0, + "completeScope": 20, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + }, + { + "id": "anotherActivity", + "instances": 200, + "canceled": 0, + "finished": 0, + "completeScope": 1, + "openIncidents": 0, + "resolvedIncidents": 0, + "deletedIncidents": 0 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/process-instance": { + "get": { + "operationId": "getHistoricProcessInstances", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get List", + "description": "Queries for historic process instances that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Process Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/process-instance/get-process-instance-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "instanceId", + "definitionId", + "definitionKey", + "definitionName", + "definitionVersion", + "businessKey", + "startTime", + "endTime", + "duration", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance ids. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the instances run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances run on." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the process definition the instances run on." + }, + { + "name": "processDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition names that the parameter is a substring of." + }, + { + "name": "processDefinitionKeyNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Exclude instances that belong to a set of process definitions. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of business keys. A process instance must have one of the given business keys. Filter by a comma-separated list of `Strings`" + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + { + "name": "rootProcessInstances", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are top level process instances." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished process instances. This flag includes all process instances\nthat are completed or terminated. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished process instances. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "withIncidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have an incident. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "withRootIncidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have a root incident. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "incidentIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have an incident with one of the given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type. See the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + { + "name": "incidentStatus", + "in": "query", + "schema": { + "enum": [ + "open", + "resolved" + ], + "type": "string" + }, + "description": "Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedActivityAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an activity after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedActivityBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an activity before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedJobAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an job after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedJobBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an job before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that were started by the given user." + }, + { + "name": "superProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id." + }, + { + "name": "subProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to one process instance that has a sub process instance with the given id." + }, + { + "name": "superCaseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + { + "name": "subCaseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to one process instance that has a sub case instance with the given id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic process instances which belong to no tenant. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances with an active activity with one of the given ids. This filter behaves differently as `activeActivityIdIn` since it also yields results when filtering for activities with an incident. Filter by a comma-separated list of `Strings`" + }, + { + "name": "executedActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that executed an activity with one of given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "activeActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have an active activity with one of given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are active." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are suspended." + }, + { + "name": "completed", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are completed." + }, + { + "name": "externallyTerminated", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are externallyTerminated." + }, + { + "name": "internallyTerminated", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are internallyTerminated." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that have/had variables with certain values.\nVariable filtering expressions are comma-separated and are structured as follows:\nA valid parameter value has the form `key_operator_value`. `key` is the variable name, `operator` is the comparison operator to be used and `value` the variable value.\n\n**Note:** Values are always treated as String objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`.\n\nKey and value may not contain underscore or comma characters.\n" + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in variables case-insensitively. If set to `true` variableName and variablename are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in variables case-insensitively. If set to `true` variableValue and variablevalue are treated as equal." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricProcessInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/process-instance?finishedAfter\u003d2013-01-01T00:00:00.000%2b0200\u0026finishedBefore\u003d2013-04-01T23:59:59.000%2b0200\u0026executedActivityAfter\u003d2013-03-23T13:42:44.000%2b0200`", + "value": [ + { + "id": "7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e", + "businessKey": null, + "processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt", + "processDefinitionVersion": 1, + "startTime": "2017-02-10T14:33:19.000+0200", + "endTime": null, + "removalTime": null, + "durationInMillis": null, + "startUserId": null, + "startActivityId": "StartEvent_1", + "deleteReason": null, + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "superProcessInstanceId": null, + "superCaseInstanceId": null, + "caseInstanceId": null, + "tenantId": null, + "state": "ACTIVE", + "restartedProcessInstanceId": "2bef365d-3406-11ef-bd73-0a0027000003" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricProcessInstances", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get List (POST)", + "description": "Queries for historic process instances that fulfill the given parameters.\nThis method is slightly more powerful than the\n[Get Process Instance](https://docs.camunda.org/manual/7.22/reference/rest/history/process-instance/get-process-instance-query/)\nbecause it allows filtering by multiple process variables of types `String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/process-instance`", + "value": { + "finishedAfter": "2013-01-01T00:00:00.000+0200", + "finishedBefore": "2013-04-01T23:59:59.000+0200", + "executedActivityAfter": "2013-03-23T13:42:44.000+0200", + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "sorting": [ + { + "sortBy": "businessKey", + "sortOrder": "asc" + }, + { + "sortBy": "startTime", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricProcessInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/history/process-instance`", + "value": [ + { + "id": "7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e", + "businessKey": null, + "processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt", + "processDefinitionVersion": 1, + "startTime": "2017-02-10T14:33:19.000+0200", + "endTime": null, + "removalTime": null, + "durationInMillis": null, + "startUserId": null, + "startActivityId": "StartEvent_1", + "deleteReason": null, + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "superProcessInstanceId": null, + "superCaseInstanceId": null, + "caseInstanceId": null, + "tenantId": null, + "state": "ACTIVE", + "restartedProcessInstanceId": "2bef365d-3406-11ef-bd73-0a0027000003" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/process-instance/count": { + "get": { + "operationId": "getHistoricProcessInstancesCount", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get List Count", + "description": "Queries for the number of historic process instances that fulfill the given parameters.\nTakes the same parameters as the [Get Process Instances](https://docs.camunda.org/manual/7.22/reference/rest/history/process-instance/get-process-instance-query/) method.", + "parameters": [ + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance ids. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the instances run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances run on." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the process definition the instances run on." + }, + { + "name": "processDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition names that the parameter is a substring of." + }, + { + "name": "processDefinitionKeyNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Exclude instances that belong to a set of process definitions. Filter by a comma-separated list of `Strings`." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of business keys. A process instance must have one of the given business keys. Filter by a comma-separated list of `Strings`" + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + { + "name": "rootProcessInstances", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are top level process instances." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished process instances. This flag includes all process instances\nthat are completed or terminated. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished process instances. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "withIncidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have an incident. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "withRootIncidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process instances which have a root incident. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "incidentIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have an incident with one of the given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type. See the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + { + "name": "incidentStatus", + "in": "query", + "schema": { + "enum": [ + "open", + "resolved" + ], + "type": "string" + }, + "description": "Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were finished after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedActivityAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an activity after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedActivityBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an activity before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedJobAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an job after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "executedJobBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that executed an job before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that were started by the given user." + }, + { + "name": "superProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id." + }, + { + "name": "subProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to one process instance that has a sub process instance with the given id." + }, + { + "name": "superCaseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + { + "name": "subCaseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to one process instance that has a sub case instance with the given id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic process instances which belong to no tenant. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances with an active activity with one of the given ids. This filter behaves differently as `activeActivityIdIn` since it also yields results when filtering for activities with an incident. Filter by a comma-separated list of `Strings`" + }, + { + "name": "executedActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that executed an activity with one of given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "activeActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to instances that have an active activity with one of given ids. Filter by a comma-separated list of `Strings`" + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are active." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are suspended." + }, + { + "name": "completed", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are completed." + }, + { + "name": "externallyTerminated", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are externallyTerminated." + }, + { + "name": "internallyTerminated", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Restrict to instances that are internallyTerminated." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that have/had variables with certain values.\nVariable filtering expressions are comma-separated and are structured as follows:\nA valid parameter value has the form `key_operator_value`. `key` is the variable name, `operator` is the comparison operator to be used and `value` the variable value.\n\n**Note:** Values are always treated as String objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`.\n\nKey and value may not contain underscore or comma characters.\n" + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in variables case-insensitively. If set to `true` variableName and variablename are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in variables case-insensitively. If set to `true` variableValue and variablevalue are treated as equal." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/history/process-instance/count?variables\u003dmyVariable_eq_camunda`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricProcessInstancesCount", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get List Count (POST)", + "description": "Queries for the number of historic process instances that fulfill the given parameters.\nThis method takes the same message body as the [Get Process Instances (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/process-instance/get-process-instance-query/) method and\ntherefore it is slightly more powerful than the [Get Process Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/process-instance/post-process-instance-query-count/) method.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/process-instance/count`", + "value": { + "finishedAfter": "2013-01-01T00:00:00.000+0200", + "finishedBefore": "2013-04-01T23:59:59.000+0200", + "executedActivityAfter": "2013-03-23T13:42:44.000+0200", + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/process-instance/delete": { + "post": { + "operationId": "deleteHistoricProcessInstancesAsync", + "tags": [ + "Historic Process Instance" + ], + "summary": "Delete Async (POST)", + "description": "Delete multiple historic process instances asynchronously (batch).\nAt least `historicProcessInstanceIds` or `historicProcessInstanceQuery` has to be provided.\nIf both are provided then all instances matching query criterion and instances from the list will be deleted.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteHistoricProcessInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/process-instance/delete`", + "value": { + "deleteReason": "aReason", + "historicProcessInstanceIds": [ + "aProcess", + "secondProcess" + ], + "historicProcessInstanceQuery": { + "startedAfter": "2016-10-11T11:44:13.000+0200", + "finishedBefore": "2016-10-13T11:44:17.000+0200" + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/history/process-instance/delete`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "process-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, i.e. neither historicProcessInstanceIds,\nnor historicProcessInstanceQuery is present. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/process-instance/report": { + "get": { + "operationId": "getHistoricProcessInstanceDurationReport", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get Duration Report", + "description": "Retrieves a report about the duration of completed process instances, grouped by a period.\nThese reports include the maximum, minimum and average duration of all completed process instances which were started in a given period.\n\n**Note:** This only includes historic data.", + "parameters": [ + { + "name": "reportType", + "in": "query", + "schema": { + "type": "string" + }, + "required": true, + "description": "**Mandatory.** Specifies the type of the report to retrieve.\nTo retrieve a report about the duration of process instances, the value must be set to `duration`." + }, + { + "name": "periodUnit", + "in": "query", + "schema": { + "enum": [ + "month", + "quarter" + ], + "type": "string" + }, + "required": true, + "description": "**Mandatory.** Specifies the granularity of the report. Valid values are `month` and `quarter`." + }, + { + "name": "processDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition ids. Must be a comma-separated list of process definition ids." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition keys. Must be a comma-separated list of process definition keys." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started before the given date.\nBy [default](), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2016-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to instances that were started after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2016-01-23T14:42:45.000+0200`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DurationReportResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/process-instance/report?reportType\u003dduration\u0026periodUnit\u003dquarter\u0026processDefinitionKeyIn\u003dinvoice`", + "value": [ + { + "period": 1, + "periodUnit": "QUARTER", + "maximum": 500000, + "minimum": 250000, + "average": 375000 + }, + { + "period": 2, + "periodUnit": "QUARTER", + "maximum": 600000, + "minimum": 300000, + "average": 450000 + }, + { + "period": 3, + "periodUnit": "QUARTER", + "maximum": 1000000, + "minimum": 500000, + "average": 750000 + }, + { + "period": 4, + "periodUnit": "QUARTER", + "maximum": 200000, + "minimum": 100000, + "average": 150000 + } + ] + } + } + }, + "application/csv": { + "schema": {} + }, + "text/csv": { + "schema": {} + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid or mandatory parameters are not supplied.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the authenticated user is unauthorized to read the history.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/process-instance/set-removal-time": { + "post": { + "operationId": "setRemovalTimeAsync", + "tags": [ + "Historic Process Instance" + ], + "summary": "Set Removal Time Async (POST)", + "description": "Sets the removal time to multiple historic process instances asynchronously (batch).\n\nAt least `historicProcessInstanceIds` or `historicProcessInstanceQuery` has to be provided.\nIf both are provided, all instances matching query criterion and instances from the list will be updated with a removal time.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetRemovalTimeToHistoricProcessInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/process-instance/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "hierarchical": true, + "historicProcessInstanceQuery": { + "unfinished": true + }, + "historicProcessInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + }, + "example-2": { + "summary": "POST `/history/process-instance/set-removal-time`", + "value": { + "absoluteRemovalTime": "2019-05-05T11:56:24.725+0200", + "hierarchical": true, + "updateInChunks": true, + "updateChunkSize": 300, + "historicProcessInstanceQuery": { + "unfinished": true + }, + "historicProcessInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7", + "b4d2ad94-7240-11e9-98b7-be5e0f7575b7" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for POST `/history/process-instance/set-removal-time`", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "process-set-removal-time", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nRequest was unsuccessfull due to a bad user request. This occurs if some of the query parameters are invalid,\ne. g. if neither `historicProcessInstances` nor `historicProcessInstanceQuery` is present or if no mode is specified.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/process-instance/{id}": { + "delete": { + "operationId": "deleteHistoricProcessInstance", + "tags": [ + "Historic Process Instance" + ], + "summary": "Delete", + "description": "Deletes a process instance from the history by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic process instance to be deleted." + }, + { + "name": "failIfNotExists", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `false`, the request will still be successful if the process id is not found." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nHistoric process instance with given id does not exist." + } + } + }, + "get": { + "operationId": "getHistoricProcessInstance", + "tags": [ + "Historic Process Instance" + ], + "summary": "Get", + "description": "Retrieves a historic process instance by id, according to the `HistoricProcessInstance` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the historic process instance to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/process-instance/7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e`", + "value": { + "id": "7c80cc8f-ef95-11e6-b6e6-34f39ab71d4e", + "businessKey": null, + "processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e", + "processDefinitionKey": "invoice", + "processDefinitionName": "Invoice Receipt", + "processDefinitionVersion": 1, + "startTime": "2017-02-10T14:33:19.000+0200", + "endTime": null, + "removalTime": null, + "durationInMillis": null, + "startUserId": null, + "startActivityId": "StartEvent_1", + "deleteReason": null, + "rootProcessInstanceId": "f8259e5d-ab9d-11e8-8449-e4a7a094a9d6", + "superProcessInstanceId": null, + "superCaseInstanceId": null, + "caseInstanceId": null, + "tenantId": null, + "state": "ACTIVE", + "restartedProcessInstanceId": "2bef365d-3406-11ef-bd73-0a0027000003" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not Found\nHistoric process instance with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/history/process-instance/{id}/variable-instances": { + "delete": { + "operationId": "deleteHistoricVariableInstancesOfHistoricProcessInstance", + "tags": [ + "Historic Process Instance" + ], + "summary": "Delete Variable Instances", + "description": "Deletes all variables of a process instance from the history by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance for which all historic variables are to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nHistoric process instance with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#parse-exceptions) for the error response format." + } + } + } + }, + "/history/task": { + "get": { + "operationId": "getHistoricTaskInstances", + "tags": [ + "Historic Task Instance" + ], + "summary": "Get Tasks (Historic)", + "description": "Queries for historic tasks that fulfill the given parameters. The size of the result\nset can be retrieved by using the\n[Get Task Count](https://docs.camunda.org/manual/7.22/reference/rest/history/task/get-task-query-count/)\nmethod.", + "parameters": [ + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by task id." + }, + { + "name": "taskParentTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by parent task id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "rootProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by root process instance id." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instances with one of the give business keys.\nThe keys need to be in a comma-separated list." + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that has the parameter value as a substring." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that executed the task." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the case execution that executed the task." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case definition id." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + { + "name": "caseDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed comma-separated activity instance ids." + }, + { + "name": "taskName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given name." + }, + { + "name": "taskNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + { + "name": "taskDescription", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given description." + }, + { + "name": "taskDescriptionLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a description that has the parameter value as a substring." + }, + { + "name": "taskDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given key." + }, + { + "name": "taskDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the passed comma-separated task definition keys." + }, + { + "name": "taskDeleteReason", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given delete reason." + }, + { + "name": "taskDeleteReasonLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a delete reason that has the parameter value as a substring." + }, + { + "name": "taskAssignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user is assigned to." + }, + { + "name": "taskAssigneeLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are assigned to users with the parameter value as a substring." + }, + { + "name": "taskOwner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user owns." + }, + { + "name": "taskOwnerLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are owned by users with the parameter value as a substring." + }, + { + "name": "taskPriority", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Restrict to tasks that have the given priority." + }, + { + "name": "assigned", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + { + "name": "unassigned", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished tasks. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished tasks. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "processFinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks of finished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "processUnfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks of unfinished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "taskDueDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskDueDateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskDueDateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withoutTaskDueDate", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have no due date. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "taskFollowUpDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskFollowUpDateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskFollowUpDateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A task instance must have one of the given\ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic task instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "taskVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that have variables with certain values. Variable filtering expressions are\ncomma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to process instances that have variables with certain\nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`;\n* `notLike`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable name provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable value provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + }, + { + "name": "taskInvolvedUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given user." + }, + { + "name": "taskInvolvedGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given group." + }, + { + "name": "taskHadCandidateUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given candidate user." + }, + { + "name": "taskHadCandidateGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given candidate group." + }, + { + "name": "withCandidateGroups", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateGroups", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "taskId", + "activityInstanceId", + "processDefinitionId", + "processInstanceId", + "executionId", + "duration", + "endTime", + "startTime", + "taskName", + "taskDescription", + "assignee", + "owner", + "dueDate", + "followUpDate", + "deleteReason", + "taskDefinitionKey", + "priority", + "caseDefinitionId", + "caseInstanceId", + "caseExecutionId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricTaskInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/task?taskAssignee\u003danAssignee\u0026priority\u003d42`", + "description": "GET `/history/task?taskAssignee\u003danAssignee\u0026priority\u003d42`", + "value": [ + { + "id": "anId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecution", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "activityInstanceId": "anActInstId", + "name": "aName", + "description": "aDescription", + "deleteReason": "aDeleteReason", + "owner": "anOwner", + "assignee": "anAssignee", + "startTime": "2013-01-23T13:42:42.000+0200", + "endTime": "2013-01-23T13:45:42.000+0200", + "duration": 2000, + "taskDefinitionKey": "aTaskDefinitionKey", + "priority": 42, + "due": "2013-01-23T13:49:42.000+0200", + "parentTaskId": "aParentId", + "followUp:": "2013-01-23T13:44:42.000+0200", + "tenantId": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "taskState": "aTaskState" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricTaskInstances", + "tags": [ + "Historic Task Instance" + ], + "summary": "Get Tasks (Historic) (POST)", + "description": "Queries for historic tasks that fulfill the given parameters. This method is slightly more powerful\nthan the [Get Tasks (Historic)](https://docs.camunda.org/manual/7.22/reference/rest/history/task/get-task-query/) method because\nit allows filtering by multiple process or task variables of types `String`, `Number` or `Boolean`.\nThe size of the result set can be retrieved by using the\n[Get Task Count (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/task/post-task-query-count/)\nmethod.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricTaskInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/task`", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "priority": 10, + "sorting": [ + { + "sortBy": "priority", + "sortOrder": "asc" + }, + { + "sortBy": "duration", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricTaskInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/history/task`", + "description": "POST `/history/task`", + "value": [ + { + "id": "anId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecution", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "activityInstanceId": "anActInstId", + "name": "aName", + "description": "aDescription", + "deleteReason": "aDeleteReason", + "owner": "anOwner", + "assignee": "anAssignee", + "startTime": "2013-01-23T13:42:42.000+0200", + "endTime": "2013-01-23T13:45:42.000+0200", + "duration": 2000, + "taskDefinitionKey": "aTaskDefinitionKey", + "priority": 10, + "due": "2013-01-23T13:49:42.000+0200", + "parentTaskId": "aParentId", + "followUp:": "2013-01-23T13:44:42.000+0200", + "tenantId": null, + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "taskState": "aTaskState" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/task/count": { + "get": { + "operationId": "getHistoricTaskInstancesCount", + "tags": [ + "Historic Task Instance" + ], + "summary": "Get Task Count", + "description": "Queries for the number of historic tasks that fulfill the given parameters.\nTakes the same parameters as the\n[Get Tasks (Historic)](https://docs.camunda.org/manual/7.22/reference/rest/history/task/get-task-query/)\nmethod.", + "parameters": [ + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by task id." + }, + { + "name": "taskParentTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by parent task id." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "rootProcessInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by root process instance id." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instances with one of the give business keys.\nThe keys need to be in a comma-separated list." + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that has the parameter value as a substring." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the execution that executed the task." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the case execution that executed the task." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case definition id." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + { + "name": "caseDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed comma-separated activity instance ids." + }, + { + "name": "taskName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given name." + }, + { + "name": "taskNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + { + "name": "taskDescription", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given description." + }, + { + "name": "taskDescriptionLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a description that has the parameter value as a substring." + }, + { + "name": "taskDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given key." + }, + { + "name": "taskDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the passed comma-separated task definition keys." + }, + { + "name": "taskDeleteReason", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given delete reason." + }, + { + "name": "taskDeleteReasonLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a delete reason that has the parameter value as a substring." + }, + { + "name": "taskAssignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user is assigned to." + }, + { + "name": "taskAssigneeLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are assigned to users with the parameter value as a substring." + }, + { + "name": "taskOwner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user owns." + }, + { + "name": "taskOwnerLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are owned by users with the parameter value as a substring." + }, + { + "name": "taskPriority", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Restrict to tasks that have the given priority." + }, + { + "name": "assigned", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + { + "name": "unassigned", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + { + "name": "finished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include finished tasks. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "unfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include unfinished tasks. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "processFinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks of finished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "processUnfinished", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks of unfinished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "taskDueDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskDueDateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskDueDateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that are due after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "withoutTaskDueDate", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have no due date. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "taskFollowUpDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskFollowUpDateBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "taskFollowUpDateAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that have a followUp date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "startedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "finishedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A task instance must have one of the given\ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic task instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "taskVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that have variables with certain values. Variable filtering expressions are\ncomma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to process instances that have variables with certain\nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`;\n* `notLike`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable name provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable value provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + }, + { + "name": "taskInvolvedUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given user." + }, + { + "name": "taskInvolvedGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given group." + }, + { + "name": "taskHadCandidateUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given candidate user." + }, + { + "name": "taskHadCandidateGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with a historic identity link to the given candidate group." + }, + { + "name": "withCandidateGroups", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateGroups", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/task/count?taskAssginee\u003danAssignee\u0026taskPriority\u003d50`", + "description": "GET `/history/task/count?taskAssginee\u003danAssignee\u0026taskPriority\u003d50`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricTaskInstancesCount", + "tags": [ + "Historic Task Instance" + ], + "summary": "Get Task Count (POST)", + "description": "Queries for the number of historic tasks that fulfill the given parameters. Takes the\nsame parameters as the [Get Tasks (Historic)](https://docs.camunda.org/manual/7.22/reference/rest/history/task/get-task-query/)\nmethod. Corresponds to the size of the result set of the\n[Get Tasks (Historic) (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/task/post-task-query/)\nmethod and takes the same parameters.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricTaskInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/task/count`", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "priority": 10 + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/task/count`", + "description": "POST `/history/task/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/task/report": { + "get": { + "operationId": "getHistoricTaskInstanceReport", + "tags": [ + "Historic Task Instance" + ], + "summary": "Get Task Report (Historic)", + "description": "Retrieves a report of completed tasks. When the report type is set to `count`, the\nreport contains a list of completed task counts where an entry contains the task name, the\ndefinition key of the task, the process definition id, the process definition key, the process\ndefinition name and the count of how many tasks were completed for the specified key in a given\nperiod. When the report type is set to `duration`, the report contains a minimum, maximum and\naverage duration value of all completed task instances in a given period.", + "parameters": [ + { + "name": "reportType", + "in": "query", + "schema": { + "enum": [ + "duration", + "count" + ], + "type": "string" + }, + "description": "**Mandatory.** Specifies the kind of the report to execute. To retrieve a report\nabout the duration of process instances the value must be set to `duration`. For a\nreport of the completed tasks in a specific timespan the value must be set to `count`." + }, + { + "name": "periodUnit", + "in": "query", + "schema": { + "enum": [ + "MONTH", + "QUARTER" + ], + "type": "string" + }, + "description": "When the report type is set to `duration`, this parameter is **mandatory**.\nSpecifies the granularity of the report. Valid values are `month` and `quarter`." + }, + { + "name": "completedBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were completed before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "completedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to tasks that were completed after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "groupBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "When the report type is set to `count`, this parameter is **mandatory**. Groups the\ntasks report by a given criterion. Valid values are `taskName` and `processDefinition`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricTaskInstanceReportResultDto" + } + }, + "examples": { + "example-1": { + "summary": "Request for completed task report", + "description": "GET `/history/task/report?reportType\u003dcount\u0026groupBy\u003dprocessDefinition`", + "value": [ + { + "taskName": null, + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processDefinitionName": "A Process Definition Name", + "count": 42 + }, + { + "taskName": null, + "processDefinitionId": "anotherProcessDefinitionId", + "processDefinitionKey": "anotherProcessDefinitionKey", + "processDefinitionName": "Another Process Definition Name", + "count": 9000 + } + ] + }, + "example-2": { + "summary": "Request for duration report.", + "description": "GET `/history/task/report?reportType\u003dduration\u0026periodUnit\u003dquarter`", + "value": [ + { + "period": 1, + "periodUnit": "QUARTER", + "maximum": 500000, + "minimum": 250000, + "average": 375000 + }, + { + "period": 2, + "periodUnit": "QUARTER", + "maximum": 600000, + "minimum": 300000, + "average": 450000 + }, + { + "period": 3, + "periodUnit": "QUARTER", + "maximum": 1000000, + "minimum": 500000, + "average": 750000 + }, + { + "period": 4, + "periodUnit": "QUARTER", + "maximum": 200000, + "minimum": 100000, + "average": 150000 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `completedAfter`\nparameter is supplied, but the date format is wrong. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/user-operation": { + "get": { + "operationId": "queryUserOperationEntries", + "tags": [ + "Historic User Operation Log" + ], + "summary": "Get User Operation Log (Historic)", + "description": "Queries for user operation log entries that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get User Operation Log Count](https://docs.camunda.org/manual/7.22/reference/rest/history/user-operation-log/get-user-operation-log-query-count/)\nmethod.\n\nNote that the properties of operation log entries are interpreted as\nrestrictions on the entities they apply to. That means, if a single\nprocess instance is updated, the field `processInstanceId` is\npopulated. If a single operation updates all process instances of the\nsame process definition, the field `processInstanceId` is `null` (a\n`null` restriction is viewed as a wildcard, i.e., matches a process\ninstance with any id) and the field `processDefinitionId` is\npopulated. This way, which entities were changed by a user operation\ncan easily be reconstructed.", + "parameters": [ + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by execution id." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case definition id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case execution id." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this task." + }, + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this external task." + }, + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this batch." + }, + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations of this user." + }, + { + "name": "operationId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the operation. This allows fetching of multiple entries which are part\nof a composite operation." + }, + { + "name": "operationType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the operation like `Claim` or `Delegate`. See the\n[Javadoc](https://docs.camunda.org/manual/7.22/reference/javadoc/?org/camunda/bpm/engine/history/UserOperationLogEntry.html)\nfor a list of available operation types." + }, + { + "name": "entityType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the entity that was affected by this operation, possible values are\n`Task`, `Attachment` or `IdentityLink`." + }, + { + "name": "entityTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of types of the entities that was affected by this operation,\npossible values are `Task`, `Attachment` or `IdentityLink`." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the category that this operation is associated with, possible values are\n`TaskWorker`, `Admin` or `Operator`." + }, + { + "name": "categoryIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of categories that this operation is associated with, possible values are\n`TaskWorker`, `Admin` or `Operator`." + }, + { + "name": "property", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations that changed this property, e.g., `owner` or `assignee`." + }, + { + "name": "afterTimestamp", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to entries that were created after the given timestamp. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ntimestamp must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "beforeTimestamp", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to entries that were created before the given timestamp. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ntimestamp must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "timestamp" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserOperationLogEntryDto" + } + }, + "examples": { + "example-1": { + "summary": "Gets an operation that updates a single task.", + "description": "GET `/history/user-operation?operationType\u003dClaim\u0026userId\u003ddemo\u0026sortBy\u003dtimestamp\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "anUserOperationLogEntryId", + "deploymentId": "aDeploymentId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": null, + "processInstanceId": "aProcessInstanceId", + "executionId": "anExecutionId", + "taskId": "aTaskId", + "jobId": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "userId": "demo", + "timestamp": "2014-02-25T14:58:37.000+0200", + "operationId": "anOperationId", + "operationType": "Claim", + "entityType": "Task", + "property": "assignee", + "orgValue": null, + "newValue": "demo", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "category": "TaskWorker", + "annotation": "anAnnotation" + } + ] + }, + "example-2": { + "summary": "Gets an operation that updates a multiple process instances with the same key.", + "description": "GET `/history/user-operation?operationType\u003dSuspend\u0026userId\u003ddemo`", + "value": [ + { + "id": "anUserOperationLogEntryId", + "deploymentId": "aDeploymentId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aProcessDefinitionKey", + "processInstanceId": null, + "executionId": null, + "taskId": null, + "jobId": null, + "jobDefinitionId": null, + "userId": "demo", + "timestamp": "2014-02-25T14:58:37.000+0200", + "operationId": "anOperationId", + "operationType": "Suspend", + "entityType": "ProcessInstance", + "property": "suspensionState", + "orgValue": null, + "newValue": "suspended", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "category": "Operator", + "annotation": "anAnnotation" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/user-operation/count": { + "get": { + "operationId": "queryUserOperationCount", + "tags": [ + "Historic User Operation Log" + ], + "summary": "Get User Operation Log Count", + "description": "Queries for the number of user operation log entries that fulfill the given parameters.\nTakes the same parameters as the\n[Get User Operation Log (Historic)](https://docs.camunda.org/manual/7.22/reference/rest/history/user-operation-log/get-user-operation-log-query/)\nmethod.", + "parameters": [ + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by deployment id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by execution id." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case definition id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case execution id." + }, + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this task." + }, + { + "name": "externalTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this external task." + }, + { + "name": "batchId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations on this batch." + }, + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations of this user." + }, + { + "name": "operationId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the operation. This allows fetching of multiple entries which are part\nof a composite operation." + }, + { + "name": "operationType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the operation like `Claim` or `Delegate`. See the\n[Javadoc](https://docs.camunda.org/manual/7.22/reference/javadoc/?org/camunda/bpm/engine/history/UserOperationLogEntry.html)\nfor a list of available operation types." + }, + { + "name": "entityType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of the entity that was affected by this operation, possible values are\n`Task`, `Attachment` or `IdentityLink`." + }, + { + "name": "entityTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of types of the entities that was affected by this operation,\npossible values are `Task`, `Attachment` or `IdentityLink`." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the category that this operation is associated with, possible values are\n`TaskWorker`, `Admin` or `Operator`." + }, + { + "name": "categoryIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of categories that this operation is associated with, possible values are\n`TaskWorker`, `Admin` or `Operator`." + }, + { + "name": "property", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include operations that changed this property, e.g., `owner` or `assignee`." + }, + { + "name": "afterTimestamp", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to entries that were created after the given timestamp. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ntimestamp must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., 2013-01-23T14:42:45.000+0200." + }, + { + "name": "beforeTimestamp", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restrict to entries that were created before the given timestamp. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ntimestamp must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., 2013-01-23T14:42:45.000+0200." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/user-operation?operationType\u003dClaim\u0026userId\u003ddemo`", + "description": "GET `/history/user-operation?operationType\u003dClaim\u0026userId\u003ddemo`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/user-operation/{operationId}/clear-annotation": { + "put": { + "operationId": "clearAnnotationUserOperationLog", + "tags": [ + "Historic User Operation Log" + ], + "summary": "Clear Annotation of an User Operation Log (Historic)", + "description": "Clear the annotation which was previously set for auditing reasons.", + "parameters": [ + { + "name": "operationId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The operation id of the operation log to be updated." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid, for example if the\n`operationId` path parameter value does not exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/user-operation/{operationId}/set-annotation": { + "put": { + "operationId": "setAnnotationUserOperationLog", + "tags": [ + "Historic User Operation Log" + ], + "summary": "Set Annotation to an User Operation Log (Historic)", + "description": "Set an annotation for auditing reasons.", + "parameters": [ + { + "name": "operationId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The operation id of the operation log to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/history/user-operation/a02a5890-ad41-11e9-8609-c6bbb7c7e9e3/set-annotation`", + "value": { + "annotation": "Instances restarted due to wrong turn" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid, for example if the\n`operationId` path parameter value does not exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/variable-instance": { + "get": { + "operationId": "getHistoricVariableInstances", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instances", + "description": "Queries for historic variable instances that fulfill the given parameters.\nThe size of the result set can be retrieved by using the\n[Get Variable Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/variable-instance/get-variable-instance-query-count/)\nmethod.", + "parameters": [ + { + "name": "variableName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable name." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to variables with a name like the parameter." + }, + { + "name": "variableValue", + "in": "query", + "schema": { + "type": "object" + }, + "description": "Filter by variable value. Is treated as a `String` object on server side." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable name provided in `variableName` and `variableNameLike` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable value provided in `variableValue` case-insensitively. If set to `true`\n**variableValue** and **variablevalue** are treated as equal." + }, + { + "name": "variableTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type\n\u0027serializable\u0027." + }, + { + "name": "includeDeleted", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include variables that has already been deleted during the execution." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process instance the variable belongs to." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-separated process instance ids." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the variable belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a key of the process definition the variable belongs to." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated execution ids." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case instance the variable belongs to." + }, + { + "name": "caseExecutionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated case execution ids." + }, + { + "name": "caseActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated case activity ids." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated task ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated activity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic variable instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "variableNameIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-separated variable names." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "instanceId", + "variableName", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricVariableInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/history/variable-instance?variableName\u003dmy_variable`", + "description": "GET `/history/variable-instance?variableName\u003dmy_variable`", + "value": [ + { + "id": "someId", + "name": "my_variable", + "type": "String", + "value": "my_value", + "valueInfo": {}, + "processDefinitionKey": "aVariableInstanceProcDefKey", + "processDefinitionId": "aVariableInstanceProcDefId", + "processInstanceId": "aVariableInstanceProcInstId", + "executionId": "aVariableInstanceExecutionId", + "activityInstanceId": "aVariableInstanceActivityInstId", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "errorMessage": null, + "state": "CREATED", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricVariableInstances", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instances (POST)", + "description": "Queries for historic variable instances that fulfill the given parameters.\nThis method is slightly more powerful than the\n[Get Variable Instances](https://docs.camunda.org/manual/7.22/reference/rest/history/variable-instance/get-variable-instance-query/)\nmethod because it allows filtering by variable values of the different\ntypes `String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricVariableInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/variable-instance`", + "value": { + "variableName": "someVariable", + "variableValue": 42, + "sorting": [ + { + "sortBy": "variableName", + "sortOrder": "asc" + }, + { + "sortBy": "instanceId", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HistoricVariableInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/history/variable-instance`", + "description": "POST `/history/variable-instance`", + "value": [ + { + "id": "someId", + "name": "someVariable", + "type": "Integer", + "variableType": "integer", + "value": 5, + "valueInfo": {}, + "processDefinitionKey": "aProcessDefinitionKey", + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcInstId", + "executionId": "aExecutionId", + "activityInstanceId": "aActivityInstId", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "errorMessage": null, + "state": "CREATED", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/variable-instance/count": { + "get": { + "operationId": "getHistoricVariableInstancesCount", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instance Count", + "description": "Queries for the number of historic variable instances that fulfill the given\nparameters.\nTakes the same parameters as the\n[Get Variable Instances](https://docs.camunda.org/manual/7.22/reference/rest/history/variable-instance/get-variable-instance-query/)\nmethod.", + "parameters": [ + { + "name": "variableName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable name." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to variables with a name like the parameter." + }, + { + "name": "variableValue", + "in": "query", + "schema": { + "type": "object" + }, + "description": "Filter by variable value. Is treated as a `String` object on server side." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable name provided in `variableName` and `variableNameLike` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match the variable value provided in `variableValue` case-insensitively. If set to `true`\n**variableValue** and **variablevalue** are treated as equal." + }, + { + "name": "variableTypeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type\n\u0027serializable\u0027." + }, + { + "name": "includeDeleted", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include variables that has already been deleted during the execution." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process instance the variable belongs to." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-separated process instance ids." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the process definition the variable belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a key of the process definition the variable belongs to." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated execution ids." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the case instance the variable belongs to." + }, + { + "name": "caseExecutionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated case execution ids." + }, + { + "name": "caseActivityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated case activity ids." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated task ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and and comma-separated activity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include historic variable instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + { + "name": "variableNameIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-separated variable names." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/history/variable-instance/count?variableName\u003dmy_variable`", + "description": "GET `/history/variable-instance/count?variableName\u003dmy_variable`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryHistoricVariableInstancesCount", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instance Count (POST)", + "description": "Queries for historic variable instances that fulfill the given parameters.\nThis method takes the same message body as the\n[Get Variable Instances (POST)](https://docs.camunda.org/manual/7.22/reference/rest/history/variable-instance/post-variable-instance-query/)\nmethod and therefore it is more powerful regarding variable values\nthan the\n[Get Variable Instance Count](https://docs.camunda.org/manual/7.22/reference/rest/history/variable-instance/get-variable-instance-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricVariableInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/variable-instance/count`", + "value": { + "variableName": "someVariable", + "variableValue": 42 + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "POST `/history/variable-instance/count`", + "description": "POST `/history/variable-instance/count`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/variable-instance/{id}": { + "delete": { + "operationId": "deleteHistoricVariableInstance", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Delete Variable Instance", + "description": "Deletes a historic variable instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the variable instance." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getHistoricVariableInstance", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instance", + "description": "Retrieves a historic variable by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the variable instance." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoricVariableInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/history/variable-instance/someId`", + "value": { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "valueInfo": {}, + "processDefinitionKey": "aProcessDefinitionKey", + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "aExecutionId", + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseDefinitionKey": null, + "caseDefinitionId": null, + "caseInstanceId": null, + "caseExecutionId": null, + "taskId": null, + "tenantId": null, + "errorMessage": null, + "state": "CREATED", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/history/variable-instance/{id}/data": { + "get": { + "operationId": "getHistoricVariableInstanceBinary", + "tags": [ + "Historic Variable Instance" + ], + "summary": "Get Variable Instance (Binary)", + "description": "Retrieves the content of a historic variable by id. Applicable for variables that\nare serialized as binary data.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the variable instance." + } + ], + "responses": { + "200": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/octet-stream` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/history/variable-instance/someId/data`", + "description": "For binary variables or files without any MIME type information, a byte stream is returned.", + "value": "" + } + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `*/*` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET `/history/variable-instance/someId/data`", + "description": "File variables with MIME type information are returned as the saved type. Additionally,\n for file variables the Content-Disposition header will be set.", + "value": "" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id exists but is not a binary variable. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/identity/groups": { + "get": { + "operationId": "getGroupInfo", + "tags": [ + "Identity" + ], + "summary": "Get a User\u0027s Groups", + "description": "Gets the groups of a user by id and includes all users that share a group with the\ngiven user.", + "parameters": [ + { + "name": "userId", + "in": "query", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to get the groups for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentityServiceGroupInfoDto" + }, + "examples": { + "example-1": { + "description": "GET `/identity/groups?userId\u003daUserId`", + "value": { + "groups": [ + { + "id": "group1Id", + "name": "group1" + } + ], + "groupUsers": [ + { + "firstName": "firstName", + "lastName": "lastName", + "displayName": "firstName lastName", + "id": "anotherUserId" + } + ] + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the `userId` query parameter is missing. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/identity/password-policy": { + "get": { + "operationId": "getPasswordPolicy", + "tags": [ + "Identity" + ], + "summary": "Get Password Policy", + "description": "A password policy consists of a list of rules that new passwords must follow to be\npolicy compliant. This end point returns a JSON representation of the\nlist of policy rules. More information on password policies in Camunda can be found in the password policy\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/password-policy/) and in\nthe [security instructions](https://docs.camunda.org/manual/7.22/user-guide/security/).", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordPolicyDto" + }, + "examples": { + "example-1": { + "description": "GET `/identity/password-policy`", + "value": { + "rules": [ + { + "placeholder": "PASSWORD_POLICY_USER_DATA", + "parameter": null + }, + { + "placeholder": "PASSWORD_POLICY_LENGTH", + "parameter": { + "minLength": "10" + } + }, + { + "placeholder": "PASSWORD_POLICY_LOWERCASE", + "parameter": { + "minLowerCase": "1" + } + }, + { + "placeholder": "PASSWORD_POLICY_UPPERCASE", + "parameter": { + "minUpperCase": "1" + } + }, + { + "placeholder": "PASSWORD_POLICY_DIGIT", + "parameter": { + "minDigit": "1" + } + }, + { + "placeholder": "PASSWORD_POLICY_SPECIAL", + "parameter": { + "minSpecial": "1" + } + } + ] + } + } + } + } + }, + "description": "Request successful. This example uses the built-in password policy that enforces a minimum password length,\nand some complexity rules." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No password policy was found." + } + } + }, + "post": { + "operationId": "checkPassword", + "tags": [ + "Identity" + ], + "summary": "Validate Password", + "description": "A password policy consists of a list of rules that new passwords must follow to be\npolicy compliant. A password can be checked for compliancy via this\nend point. More information on password policies in Camunda can be found in the password policy\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/password-policy/) and in\nthe [security instructions](https://docs.camunda.org/manual/7.22/user-guide/security/).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PasswordPolicyRequestDto" + }, + "examples": { + "example-1": { + "summary": "POST `/identity/password-policy`", + "value": { + "password": "myPassword", + "profile": { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "jonny@camunda.org" + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CheckPasswordPolicyResultDto" + }, + "examples": { + "example-1": { + "description": "POST `/identity/password-policy`", + "value": { + "rules": [ + { + "placeholder": "PASSWORD_POLICY_USER_DATA", + "parameter": null, + "valid": true + }, + { + "placeholder": "PASSWORD_POLICY_LOWERCASE", + "parameter": { + "minLowerCase": "1" + }, + "valid": true + }, + { + "placeholder": "PASSWORD_POLICY_LENGTH", + "parameter": { + "minLength": "10" + }, + "valid": false + }, + { + "placeholder": "PASSWORD_POLICY_UPPERCASE\"", + "parameter": { + "minUpperCase": "1" + }, + "valid": false + }, + { + "placeholder": "PASSWORD_POLICY_DIGIT", + "parameter": { + "minDigit": "1" + }, + "valid": false + }, + { + "placeholder": "PASSWORD_POLICY_SPECIAL", + "parameter": { + "minSpecial": "1" + }, + "valid": false + } + ], + "valid": false + } + } + } + } + }, + "description": "Request successful. This example uses the built-in password policy that enforces a minimum password length, and\nsome complexity rules. The checked password is myPassword which is not complex enough to match all of\nthe policy rules." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No password policy was found to check the password against." + } + } + } + }, + "/identity/verify": { + "post": { + "operationId": "verifyUser", + "tags": [ + "Identity" + ], + "summary": "Verify User", + "description": "Verifies that user credentials are valid.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BasicUserCredentialsDto" + }, + "examples": { + "example-1": { + "summary": "POST `/identity/verify`", + "value": { + "username": "testUser", + "password": "testPassword" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/identity/verify`", + "value": { + "authenticatedUser": "testUser", + "authenticated": true + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If body does not contain username or password." + } + } + } + }, + "/incident": { + "get": { + "operationId": "getIncidents", + "tags": [ + "Incident" + ], + "summary": "Get List", + "description": "Queries for incidents that fulfill given parameters. The size of the result set can be retrieved by using\nthe [Get Incident Count](https://docs.camunda.org/manual/7.22/reference/rest/incident/get-query-count/) method.", + "parameters": [ + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to the given incident type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident\ntypes." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident message." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that incidents message is a substring of the given value. The string can include\nthe wildcard character \u0027%\u0027 to express like-strategy: starts with (`string%`), ends with (`%string`) or\ncontains (`%string%`)." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given keys. Must be a\ncomma-separated list." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process instance with the given id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an execution with the given id." + }, + { + "name": "incidentTimestampBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an incidentTimestamp date before the given date. \nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "incidentTimestampAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an incidentTimestamp date after the given date. \nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an activity with the given id." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that were created due to the failure of an activity with the given id." + }, + { + "name": "causeIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as cause incident." + }, + { + "name": "rootCauseIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as root cause incident." + }, + { + "name": "configuration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as configuration." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated tenant ids." + }, + { + "name": "jobDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated job definition ids." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "incidentId", + "incidentMessage", + "incidentTimestamp", + "incidentType", + "executionId", + "activityId", + "processInstanceId", + "processDefinitionId", + "causeIncidentId", + "rootCauseIncidentId", + "configuration", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IncidentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/incident/anIncidentId`", + "value": [ + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "incidentTimestamp": "2014-03-01T08:00:00.000+0200", + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "tenantId": null, + "incidentMessage": "anIncidentMessage", + "jobDefinitionId": "aJobDefinitionId", + "annotation": "an annotation" + }, + { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anotherExecutionId", + "incidentTimestamp": "2014-03-01T09:00:00.000+0200", + "incidentType": "customIncidentType", + "activityId": "userTask", + "failedActivityId": "userTask", + "causeIncidentId": "anotherCauseIncidentId", + "rootCauseIncidentId": "anotherRootCauseIncidentId", + "configuration": "anotherConfiguration", + "tenantId": null, + "incidentMessage": "anotherIncidentMessage", + "jobDefinitionId": null, + "annotation": "another annotation" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error\nresponse format." + } + } + } + }, + "/incident/count": { + "get": { + "operationId": "getIncidentsCount", + "tags": [ + "Incident" + ], + "summary": "Get List Count", + "description": "Queries for the number of incidents that fulfill given parameters. Takes the same parameters as the\n[Get Incidents](https://docs.camunda.org/manual/7.22/reference/rest/incident/get-query/) method.", + "parameters": [ + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to the given incident type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident\ntypes." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident message." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that incidents message is a substring of the given value. The string can include\nthe wildcard character \u0027%\u0027 to express like-strategy: starts with (`string%`), ends with (`%string`) or\ncontains (`%string%`)." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process definition with the given keys. Must be a\ncomma-separated list." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to a process instance with the given id." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an execution with the given id." + }, + { + "name": "incidentTimestampBefore", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an incidentTimestamp date before the given date. \nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "incidentTimestampAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Restricts to incidents that have an incidentTimestamp date after the given date. \nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that belong to an activity with the given id." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that were created due to the failure of an activity with the given id." + }, + { + "name": "causeIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as cause incident." + }, + { + "name": "rootCauseIncidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given incident id as root cause incident." + }, + { + "name": "configuration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have the given parameter set as configuration." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated tenant ids." + }, + { + "name": "jobDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restricts to incidents that have one of the given comma-separated job definition ids." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/incident/count?processInstanceId\u003daProcInstId`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error\nresponse format." + } + } + } + }, + "/incident/{id}": { + "delete": { + "operationId": "resolveIncident", + "tags": [ + "Incident" + ], + "summary": "Resolve Incident", + "description": "Resolves an incident with given id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the incident to be resolved." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if an incident with given id does not exist." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if an incident is not related to any execution or an incident is of type `failedJob` or\n`failedExternalTask`. To resolve such an incident, please refer to the\n[Incident Types](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) section." + } + } + }, + "get": { + "operationId": "getIncident", + "tags": [ + "Incident" + ], + "summary": "Get Incident", + "description": "Retrieves an incident by ID.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the incident to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IncidentDto" + }, + "examples": { + "example-1": { + "summary": "GET `/incident/anIncidentId`", + "value": { + "id": "anIncidentId", + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "executionId": "anExecutionId", + "incidentTimestamp": "2014-03-01T08:00:00.000+0200", + "incidentType": "failedJob", + "activityId": "serviceTask", + "failedActivityId": "serviceTask", + "causeIncidentId": "aCauseIncidentId", + "rootCauseIncidentId": "aRootCauseIncidentId", + "configuration": "aConfiguration", + "tenantId": null, + "incidentMessage": "anIncidentMessage", + "jobDefinitionId": "aJobDefinitionId", + "annotation": "an annotation" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if an incident with given id does not exist." + } + } + } + }, + "/incident/{id}/annotation": { + "delete": { + "operationId": "clearIncidentAnnotation", + "tags": [ + "Incident" + ], + "summary": "Clear Incident Annotation", + "description": "Clears the annotation of an incident with given id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the incident to clear the annotation at." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if no incident can be found for the given id." + } + } + }, + "put": { + "operationId": "setIncidentAnnotation", + "tags": [ + "Incident" + ], + "summary": "Set Incident Annotation", + "description": "Sets the annotation of an incident with given id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the incident to clear the annotation at." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnotationDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/incident/7c80cc8f-ef95-11e6-b6e6-34f39ab71d4b/annotation`", + "value": { + "annotation": "my annotation" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if no incident can be found for the given id." + } + } + } + }, + "/job": { + "get": { + "operationId": "getJobs", + "tags": [ + "Job" + ], + "summary": "Get Jobs", + "description": "Queries for jobs that fulfill given parameters.\nThe size of the result set can be retrieved by using the [Get Job\nCount](https://docs.camunda.org/manual/7.22/reference/rest/job/get-query-count/) method.", + "parameters": [ + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of job ids." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given job definition." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given process instance." + }, + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given comma-separated list of process instance ids." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given execution." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process definition the jobs run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the jobs run on." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for an activity with the given id." + }, + { + "name": "withRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which have retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "executable", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which are executable, i.e., retries \u003e 0 and due date is `null` or due\ndate is in the past. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "timers", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that are timers. Cannot be used together with `messages`. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "messages", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that are messages. Cannot be used together with `timers`. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "dueDates", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs where the due date is lower or higher than the given date.\nDue date expressions are comma-separated and are structured as follows:\n\nA valid condition value has the form `operator_value`.\n`operator` is the comparison operator to be used and `value` the date value\nas string.\n\nValid operator values are: `gt` - greater than; `lt` - lower than.\n`value` may not contain underscore or comma characters." + }, + { + "name": "createTimes", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs created before or after the given date.\n\nCreate time expressions are comma-separated and are structured as\nfollows:\n\nA valid condition value has the form `operator_value`.\n`operator` is the comparison operator to be used and `value` the date value\nas string.\n\nValid operator values are: `gt` - greater than; `lt` - lower than.\n`value` may not contain underscore or comma characters." + }, + { + "name": "withException", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that failed due to an exception. Value may only be `true`, as `false` is\nthe default behavior." + }, + { + "name": "exceptionMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs that failed due to an exception with the given message." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs that failed due to an exception at an activity with the given id." + }, + { + "name": "noRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which have no retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active jobs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended jobs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority lower than or equal to the given value. Value must be a\nvalid `long` value." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority higher than or equal to the given value. Value must be a\nvalid `long` value." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include jobs which belong to one of the passed comma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include jobs which belong to no tenant. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "includeJobsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include jobs which belong to no tenant. Can be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "jobId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "jobPriority", + "jobRetries", + "jobDueDate", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobDto" + } + }, + "examples": { + "example-1": { + "description": "GET `/job/count?dueDates\u003dgt_2012-07-17T17:00:00.000+0200,lt_2012-07-17T18:00:00.000+0200\u0026createTimes\u003dgt_2012-05-05T10:00:00.000+0200,lt_2012-07-16T15:00:00.000+0200`", + "value": [ + { + "id": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "dueDate": "2018-07-17T17:05:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aPDKey", + "executionId": "anExecutionId", + "retries": 0, + "exceptionMessage": "An exception Message", + "failedActivityId": "anActivityId", + "suspended": false, + "priority": 10, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": "aBatchId" + }, + { + "id": "anotherJobId", + "jobDefinitionId": "anotherJobDefinitionId", + "dueDate": "2018-07-17T17:55:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "anotherPDId", + "processDefinitionKey": "anotherPDKey", + "executionId": "anotherExecutionId", + "retries": 0, + "exceptionMessage": "Another exception Message", + "failedActivityId": "anotherActivityId", + "suspended": true, + "priority": 8, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor due date comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryJobs", + "tags": [ + "Job" + ], + "summary": "Get Jobs (POST)", + "description": "Queries for jobs that fulfill given parameters. This method is slightly more\npowerful than the [Get Jobs](https://docs.camunda.org/manual/7.22/reference/rest/job/get-query/)\nmethod because it allows filtering by multiple jobs of types `String`,\n`Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job`", + "value": { + "dueDates": [ + { + "operator": "gt", + "value": "2018-07-17T17:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2018-07-17T18:00:00.000+0200" + } + ], + "createTimes": [ + { + "operator": "gt", + "value": "2012-05-05T10:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-16T15:00:00.000+0200" + } + ], + "sorting": [ + { + "sortBy": "jobDueDate", + "sortOrder": "asc" + }, + { + "sortBy": "jobRetries", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobDto" + } + }, + "examples": { + "example-1": { + "description": "POST `/job`", + "value": [ + { + "id": "aJobId", + "jobDefinitionId": "aJobDefinitionId", + "dueDate": "2018-07-17T17:05:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "aProcessDefinitionId", + "processDefinitionKey": "aPDKey", + "executionId": "anExecutionId", + "retries": 0, + "exceptionMessage": "An exception Message", + "failedActivityId": "anActivityId", + "suspended": false, + "priority": 10, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": "aBatchId" + }, + { + "id": "anotherJobId", + "jobDefinitionId": "anotherJobDefinitionId", + "dueDate": "2018-07-17T17:55:00.000+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "anotherPDId", + "processDefinitionKey": "anotherPDKey", + "executionId": "anotherExecutionId", + "retries": 0, + "exceptionMessage": "Another exception Message", + "failedActivityId": "anotherActivityId", + "suspended": true, + "priority": 8, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor due date comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition": { + "get": { + "operationId": "getJobDefinitions", + "tags": [ + "Job Definition" + ], + "summary": "Get Job Definitions", + "description": "Queries for job definitions that fulfill given parameters.\nThe size of the result set can be retrieved by using the\n[Get Job Definition Count](https://docs.camunda.org/manual/7.22/reference/rest/job-definition/get-query-count/)\nmethod.", + "parameters": [ + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed and comma-separated activity ids." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given process definition key." + }, + { + "name": "jobType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given job type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job types." + }, + { + "name": "jobConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given job configuration. For example: for\ntimer jobs it is the timer configuration." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active job definitions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended job definitions. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "withOverridingJobPriority", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include job definitions that have an overriding job priority defined. The only\neffective value is `true`. If set to `false`, this filter is not applied." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed and comma-separated tenant\nids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include job definitions which belong to no tenant. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "includeJobDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include job definitions which belong to no tenant. Can be used in combination with\n`tenantIdIn`. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "jobDefinitionId", + "activityId", + "processDefinitionId", + "processDefinitionKey", + "jobType", + "jobConfiguration", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/job-definition?activityIdIn\u003dServiceTask1,ServiceTask2`", + "description": "GET `/job-definition?activityIdIn\u003dServiceTask1,ServiceTask2`", + "value": [ + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask1", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": false, + "overridingJobPriority": 15, + "tenantId": null, + "deploymentId": "aDeploymentId" + }, + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask2", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": true, + "overridingJobPriority": null, + "tenantId": null, + "deploymentId": "aDeploymentId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryJobDefinitions", + "tags": [ + "Job Definition" + ], + "summary": "Get Job Definitions (POST)", + "description": "Queries for job definitions that fulfill given parameters. This method is slightly\nmore powerful than the\n[Get Job Definitions](https://docs.camunda.org/manual/7.22/reference/rest/job-definition/get-query/)\nmethod because it allows filtering by multiple job definitions of\ntypes `String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job-definition`", + "value": { + "activityIdIn": [ + "ServiceTask1", + "ServiceTask2" + ], + "sorting": [ + { + "sortBy": "activityId", + "sortOrder": "asc" + }, + { + "sortBy": "jobType", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/job-definition`", + "description": "POST `/job-definition`", + "value": [ + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask1", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": false, + "overridingJobPriority": 15, + "tenantId": null, + "deploymentId": "aDeploymentId" + }, + { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask2", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": true, + "overridingJobPriority": null, + "tenantId": null, + "deploymentId": "aDeploymentId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/count": { + "get": { + "operationId": "getJobDefinitionsCount", + "tags": [ + "Job Definition" + ], + "summary": "Get Job Definition Count", + "description": "Queries for the number of job definitions that fulfill given parameters.\nTakes the same parameters as the\n[Get Job Definitions](https://docs.camunda.org/manual/7.22/reference/rest/job-definition/get-query/)\nmethod.", + "parameters": [ + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job definition id." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed and comma-separated activity ids." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given process definition id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given process definition key." + }, + { + "name": "jobType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given job type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job types." + }, + { + "name": "jobConfiguration", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which exist for the given job configuration. For example: for\ntimer jobs it is the timer configuration." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active job definitions. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended job definitions. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "withOverridingJobPriority", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include job definitions that have an overriding job priority defined. The only\neffective value is `true`. If set to `false`, this filter is not applied." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed and comma-separated tenant\nids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include job definitions which belong to no tenant. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "includeJobDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include job definitions which belong to no tenant. Can be used in combination with\n`tenantIdIn`. Value may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/job-definition/count?activityIdIn\u003dServiceTask1,ServiceTask2`", + "description": "GET `/job-definition/count?activityIdIn\u003dServiceTask1,ServiceTask2`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryJobDefinitionsCount", + "tags": [ + "Job Definition" + ], + "summary": "Get Job Definition Count (POST)", + "description": "Queries for the number of job definitions that fulfill given parameters. This\nmethod takes the same message body as the\n[Get Job Definitions (POST)](https://docs.camunda.org/manual/7.22/reference/rest/job-definition/post-query/)\nmethod and therefore it is slightly more powerful than the\n[Get Job Definition Count](https://docs.camunda.org/manual/7.22/reference/rest/job-definition/get-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job-definition/count`", + "value": { + "activityIdIn": [ + "ServiceTask1", + "ServiceTask2" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job-definition/count`", + "description": "POST `/job-definition/count`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/suspended": { + "put": { + "operationId": "updateSuspensionStateJobDefinitions", + "tags": [ + "Job Definition" + ], + "summary": "Activate/Suspend Job Definitions", + "description": "Activates or suspends job definitions with the given process definition id or process definition key.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionsSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "suspend by process definition id", + "description": "PUT `/job-definition/suspended`", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "suspended": true, + "includeJobs": true, + "executionDate": "2013-11-21T10:49:45.000+0200" + } + }, + "example-2": { + "summary": "suspend by process definition key", + "description": "PUT `/job-definition/suspended`", + "value": { + "processDefinitionKey": "aProcessDefinitionKey", + "suspended": true, + "includeJobs": true, + "executionDate": "2013-11-21T10:49:45.000+0200" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid, for example if the provided\n`executionDate` parameter doesn\u0027t have the expected format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/{id}": { + "get": { + "operationId": "getJobDefinition", + "tags": [ + "Job Definition" + ], + "summary": "Get Job Definition", + "description": "Retrieves a job definition by id, according to the `JobDefinition` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job definition to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "GET `/job-definition/aJobDefinitionId`", + "description": "GET `/job-definition/aJobDefinitionId`", + "value": { + "id": "aJobDefId", + "processDefinitionId": "aProcDefId", + "processDefinitionKey": "aProcDefKey", + "activityId": "ServiceTask1", + "jobType": "asynchronous-continuation", + "jobConfiguration": "", + "suspended": false, + "overridingJobPriority": 15, + "tenantId": null, + "deploymentId": "aDeploymentId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/{id}/jobPriority": { + "put": { + "operationId": "setJobPriorityJobDefinition", + "tags": [ + "Job Definition" + ], + "summary": "Set Job Definition Priority by Id", + "description": "Sets an overriding execution priority for jobs with the given definition id.\nOptionally, the priorities of all the definitions\u0027 existing jobs are\nupdated accordingly. The priority can be reset by setting it to\n`null`, meaning that a new job\u0027s priority will not be determined based\non its definition\u0027s priority any longer. See the\n[user guide on job prioritization](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#set-job-definition-priorities-via-managementservice-api)\nfor details.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job definition to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionPriorityDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job-definition/aJobDefId/jobPriority`", + "value": { + "priority": 10, + "includeJobs": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The retries could not be set successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/{id}/retries": { + "put": { + "operationId": "setJobRetriesJobDefinition", + "tags": [ + "Job Definition" + ], + "summary": "Set Job Retries By Job Definition Id", + "description": "Sets the number of retries of all **failed** jobs associated with the given job\ndefinition id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job definition to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RetriesDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job-definition/aJobDefId/retries`", + "value": { + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The retries could not be set successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job-definition/{id}/suspended": { + "put": { + "operationId": "updateSuspensionStateJobDefinition", + "tags": [ + "Job Definition" + ], + "summary": "Activate/Suspend Job Definition By Id", + "description": "Activates or suspends a given job definition by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job definition to activate or suspend." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDefinitionSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job-definition/aJobDefinitionId/suspended`", + "value": { + "suspended": true, + "includeJobs": true, + "executionDate": "2013-11-21T10:49:45.000+0200" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid, for example if the provided\n`executionDate` parameter doesn\u0027t have the expected format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/count": { + "get": { + "operationId": "getJobsCount", + "tags": [ + "Job" + ], + "summary": "Get Job Count", + "description": "Queries for the number of jobs that fulfill given parameters.\nTakes the same parameters as the [Get\nJobs](https://docs.camunda.org/manual/7.22/reference/rest/job/get-query/) method.", + "parameters": [ + { + "name": "jobId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by job id." + }, + { + "name": "jobIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of job ids." + }, + { + "name": "jobDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given job definition." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given process instance." + }, + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given comma-separated list of process instance ids." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for the given execution." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the process definition the jobs run on." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the jobs run on." + }, + { + "name": "activityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs which exist for an activity with the given id." + }, + { + "name": "withRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which have retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "executable", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which are executable, i.e., retries \u003e 0 and due date is `null` or due\ndate is in the past. Value may only be `true`, as `false` is the default\nbehavior." + }, + { + "name": "timers", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that are timers. Cannot be used together with `messages`. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "messages", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that are messages. Cannot be used together with `timers`. Value may only\nbe `true`, as `false` is the default behavior." + }, + { + "name": "dueDates", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs where the due date is lower or higher than the given date.\nDue date expressions are comma-separated and are structured as follows:\n\nA valid condition value has the form `operator_value`.\n`operator` is the comparison operator to be used and `value` the date value\nas string.\n\nValid operator values are: `gt` - greater than; `lt` - lower than.\n`value` may not contain underscore or comma characters." + }, + { + "name": "createTimes", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs created before or after the given date.\n\nCreate time expressions are comma-separated and are structured as\nfollows:\n\nA valid condition value has the form `operator_value`.\n`operator` is the comparison operator to be used and `value` the date value\nas string.\n\nValid operator values are: `gt` - greater than; `lt` - lower than.\n`value` may not contain underscore or comma characters." + }, + { + "name": "withException", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs that failed due to an exception. Value may only be `true`, as `false` is\nthe default behavior." + }, + { + "name": "exceptionMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs that failed due to an exception with the given message." + }, + { + "name": "failedActivityId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select jobs that failed due to an exception at an activity with the given id." + }, + { + "name": "noRetriesLeft", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only select jobs which have no retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active jobs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended jobs. Value may only be `true`, as `false` is the default behavior." + }, + { + "name": "priorityLowerThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority lower than or equal to the given value. Value must be a\nvalid `long` value." + }, + { + "name": "priorityHigherThanOrEquals", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + }, + "description": "Only include jobs with a priority higher than or equal to the given value. Value must be a\nvalid `long` value." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include jobs which belong to one of the passed comma-separated tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include jobs which belong to no tenant. Value may only be `true`, as `false` is the\ndefault behavior." + }, + { + "name": "includeJobsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include jobs which belong to no tenant. Can be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "GET `/job/count?dueDates\u003dgt_2012-07-17T17:00:00.000+0200,lt_2012-07-17T18:00:00.000+0200\u0026createTimes\u003dgt_2012-05-05T10:00:00.000+0200,lt_2012-07-16T15:00:00.000+0200`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example, if an invalid operator\nfor due date comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryJobsCount", + "tags": [ + "Job" + ], + "summary": "Get Job Count (POST)", + "description": "Queries for jobs that fulfill given parameters. This method takes the same message\nbody as the [Get Jobs POST](https://docs.camunda.org/manual/7.22/reference/rest/job/post-\nquery/) method and therefore it is slightly more powerful than the\n[Get Job Count](https://docs.camunda.org/manual/7.22/reference/rest/job/get-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job/count`", + "value": { + "dueDates": [ + { + "operator": "gt", + "value": "2012-07-17T17:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-17T18:00:00.000+0200" + } + ], + "createTimes": [ + { + "operator": "gt", + "value": "2012-05-05T10:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-16T15:00:00.000+0200" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "POST `/job/count`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example, if an invalid operator\nfor due date comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/retries": { + "post": { + "operationId": "setJobRetriesAsyncOperation", + "tags": [ + "Job" + ], + "summary": "Set Job Retries Async (POST)", + "description": "Create a batch to set retries of jobs asynchronously.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetJobRetriesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/job/retries`", + "value": { + "retries": 5, + "dueDate": "2017-04-06T13:57:45.000+0200", + "jobIds": [ + "aJob", + "secondJob" + ], + "jobQuery": { + "dueDates": [ + { + "operator": "gt", + "value": "2012-07-17T17:00:00.000+0200" + }, + { + "operator": "lt", + "value": "2012-07-17T18:00:00.000+0200" + } + ] + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 OK", + "description": "POST `/job/retries`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspened": false, + "tenantId": "aTenantId", + "createUserId": "userId" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if neither\nprocessInstanceIds nor processInstanceQuery is present. Or if the\nretry count is not specified. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/suspended": { + "put": { + "operationId": "updateSuspensionStateBy", + "tags": [ + "Job" + ], + "summary": "Activate/Suspend Jobs", + "description": "Activates or suspends jobs matching the given criterion.\nThis can only be on of:\n* `jobDefinitionId`\n* `processDefinitionId`\n* `processInstanceId`\n* `processDefinitionKey`", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "Activates or suspends jobs with the given job definition id. PUT `/job/suspended`", + "value": { + "jobDefinitionId": "aJobDefinitionId", + "suspended": true + } + }, + "example-2": { + "summary": "Activates or suspends jobs with the given process definition id. PUT `/job/suspended`", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "suspended": true + } + }, + "example-3": { + "summary": "Activates or suspends jobs with the given process instance id. PUT `/job/suspended`", + "value": { + "processInstanceId": "aProcessInstanceId", + "suspended": true + } + }, + "example-4": { + "summary": "Activates or suspends jobs with the given process definition key. PUT `/job/suspended`", + "value": { + "processDefinitionKey": "aProcessDefinitionKey", + "suspended": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the request parameters are invalid, for example, if `jobDefinitionId` and\n`processDefinitionId` are both specified.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}": { + "delete": { + "operationId": "deleteJob", + "tags": [ + "Job" + ], + "summary": "Delete Job", + "description": "Deletes a job by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The job could not be deleted. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getJob", + "tags": [ + "Job" + ], + "summary": "Get Job", + "description": "Retrieves a job by id, according to the `Job` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDto" + }, + "examples": { + "example-1": { + "description": "GET `/job/aJobId`", + "value": { + "id": "aJobId", + "jobDefinitionId": "f9eec330-e3ff-11e8-8f7d-e4a7a094a9d6", + "dueDate": "2018-07-17T17:00:00+0200", + "processInstanceId": "aProcessInstanceId", + "processDefinitionId": "timer:1:f9ee9c1f-e3ff-11e8-8f7d-e4a7a094a9d6", + "processDefinitionKey": "timer", + "executionId": "anExecutionId", + "retries": 0, + "exceptionMessage": "An exception Message", + "failedActivityId": "anActivityId", + "suspended": false, + "priority": 10, + "tenantId": null, + "createTime": "2018-05-05T17:00:00+0200", + "batchId": "aBatchId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/duedate": { + "put": { + "operationId": "setJobDuedate", + "tags": [ + "Job" + ], + "summary": "Set Job Due Date", + "description": "Updates the due date of a job by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDuedateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job/aJobId/duedate`", + "value": { + "duedate": "2013-08-13T18:43:28.000+0200", + "cascade": false + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The due date could not be set successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/duedate/recalculate": { + "post": { + "operationId": "recalculateDuedate", + "tags": [ + "Job" + ], + "summary": "Recalculate Job Due Date", + "description": "Recalculates the due date of a job by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be updated." + }, + { + "name": "creationDateBased", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Recalculate the due date based on the creation date of the job or the current date.\nValue may only be `false`, as `true` is the default behavior. " + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The due date could not be recalculated successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/execute": { + "post": { + "operationId": "executeJob", + "tags": [ + "Job" + ], + "summary": "Execute Job", + "description": "Executes a job by id. **Note:** The execution of the job happens synchronously in\nthe same thread.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be executed." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The job could not be executed successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/priority": { + "put": { + "operationId": "setJobPriority", + "tags": [ + "Job" + ], + "summary": "Set Job Priority", + "description": "Sets the execution priority of a job by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PriorityDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job/aJobId/priority`", + "value": { + "priority": 10 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The priority could not be set successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/retries": { + "put": { + "operationId": "setJobRetries", + "tags": [ + "Job" + ], + "summary": "Set Job Retries", + "description": "Sets the retries of the job to the given number of retries by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobRetriesDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job/aJobId/retries`", + "value": { + "retries": 3, + "dueDate": "2017-04-06T13:57:45.000+0200" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The retries could not be set successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/stacktrace": { + "get": { + "operationId": "getStacktrace", + "tags": [ + "Job" + ], + "summary": "Get Exception Stacktrace", + "description": "Retrieves the exception stacktrace corresponding to the passed job id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to get the exception stacktrace for." + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": {}, + "examples": { + "example-1": { + "description": "GET `/job/aJobId/stacktrace`", + "value": "java.lang.RuntimeException: A exception message!\n at org.camunda.bpm.pa.service.FailingDelegate.execute(FailingDelegate.java:10)\n at org.camunda.bpm.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34)\n at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)\n ..." + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Job with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/job/{id}/suspended": { + "put": { + "operationId": "updateJobSuspensionState", + "tags": [ + "Job" + ], + "summary": "Activate/Suspend Job By Id", + "description": "Activates or suspends a given job by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the job to activate or suspend." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/job/aJobId/suspended`", + "value": { + "suspended": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + } + } + } + }, + "/message": { + "post": { + "operationId": "deliverMessage", + "tags": [ + "Message" + ], + "summary": "Correlate", + "description": "Correlates a message to the process engine to either trigger a message start event or an intermediate message \ncatching event. Internally this maps to the engine\u0027s message correlation builder methods\n`MessageCorrelationBuilder#correlateWithResult()` and `MessageCorrelationBuilder#correlateAllWithResult()`.\nFor more information about the correlation behavior, see the [Message Events](https://docs.camunda.org/manual/7.22/bpmn20/events/message-events/)\nsection of the [BPMN 2.0 Implementation Reference](https://docs.camunda.org/manual/7.22/reference/bpmn20/).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CorrelationMessageDto" + }, + "examples": { + "example-1": { + "summary": "POST /message", + "description": "Correlate without result", + "value": { + "messageName": "aMessage", + "businessKey": "aBusinessKey", + "correlationKeys": { + "aVariable": { + "value": "aValue", + "type": "String" + } + }, + "processVariables": { + "aVariable": { + "value": "aNewValue", + "type": "String", + "valueInfo": { + "transient": true + } + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + } + } + }, + "example-2": { + "summary": "POST /message", + "description": "Correlate with result", + "value": { + "messageName": "aMessage", + "businessKey": "aBusinessKey", + "correlationKeys": { + "aVariable": { + "value": "aValue", + "type": "String" + } + }, + "processVariables": { + "aVariable": { + "value": "aNewValue", + "type": "String", + "valueInfo": { + "transient": true + } + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "resultEnabled": true + } + }, + "example-3": { + "summary": "POST /message", + "description": "Correlate with result and variables", + "value": { + "messageName": "aMessage", + "businessKey": "aBusinessKey", + "correlationKeys": { + "aVariable": { + "value": "aValue", + "type": "String" + } + }, + "processVariables": { + "aVariable": { + "value": "aNewValue", + "type": "String", + "valueInfo": { + "transient": true + } + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "resultEnabled": true, + "variablesInResultEnabled": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageCorrelationResultWithVariableDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response.", + "description": "The Response content of a status 200. The property `variablesInResultEnabled` in the request body was `false` (Default).", + "value": [ + { + "resultType": "ProcessDefinition", + "execution": null, + "processInstance": { + "links": [], + "id": "aProcInstId", + "definitionId": "aProcDefId", + "businessKey": "aKey", + "caseInstanceId": "aCaseInstId", + "ended": false, + "suspended": false, + "tenantId": "aTenantId" + } + } + ] + }, + "example-2": { + "summary": "Status 200 Response.", + "description": "The Response content of a status 200. The property `variablesInResultEnabled` in the request body was `true`.", + "value": [ + { + "resultType": "Execution", + "execution": { + "id": "anExecutionId", + "processInstanceId": "aProcInstId", + "ended": false, + "tenantId": "aTenantId" + }, + "processInstance": null, + "variables": { + "aVariable": { + "value": "aNewValue", + "type": "String", + "valueInfo": { + "transient": true + } + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + } + } + ] + } + } + } + }, + "description": "Request successful. The property `resultEnabled` in the request body was `true`.\nThe `variables` property is only returned, if the property variablesInResultEnable`\nwas set to `true` in the request." + }, + "204": { + "description": "Request successful. The property `resultEnabled` in the request body was `false` (Default)." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if:\n* no `messageName` was supplied\n* both `tenantId` and `withoutTenantId` are supplied\n* the message has not been correlated to exactly one entity (execution or process definition)\n* the variable value or type is invalid, for example if the value could not be parsed to an Integer value or the passed variable type is not supported.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/metrics": { + "get": { + "operationId": "interval", + "tags": [ + "Metrics" + ], + "summary": "Get Metrics in Interval", + "description": "Retrieves a list of metrics, aggregated for a given interval.", + "parameters": [ + { + "name": "name", + "in": "query", + "schema": { + "enum": [ + "activity-instance-start", + "activity-instance-end", + "decision-instances", + "flow-node-instances", + "job-acquisition-attempt", + "job-acquired-success", + "job-acquired-failure", + "job-execution-rejected", + "job-successful", + "job-failed", + "job-locked-exclusive", + "executed-decision-elements", + "history-cleanup-removed-process-instances", + "history-cleanup-removed-case-instances", + "history-cleanup-removed-decision-instances", + "history-cleanup-removed-batch-operations", + "history-cleanup-removed-task-metrics", + "process-instances" + ], + "type": "string" + }, + "description": "The name of the metric." + }, + { + "name": "reporter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The name of the reporter (host), on which the metrics was logged. This will have\nvalue provided by the [hostname configuration property](https://docs.camunda.org/manual/7.22/reference/deployment-descriptors/tags/process-engine/#hostname)." + }, + { + "name": "startDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "The start date (inclusive)." + }, + { + "name": "endDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "The end date (exclusive)." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "interval", + "in": "query", + "schema": { + "default": 900, + "type": "string" + }, + "description": "The interval for which the metrics should be aggregated. Time unit is seconds.\nDefault: The interval is set to 15 minutes (900 seconds)." + }, + { + "name": "aggregateByReporter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Aggregate metrics by reporter." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricsIntervalResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /metrics?name\u003dflow-node-instances\u0026startDate\u003d1970-01-01T01:45:00.000%2b0200\u0026endDate\u003d1970-01-01T02:00:00.000%2b0200", + "value": [ + { + "timestamp": "1970-01-01T01:45:00.000+0200", + "name": "flow-node-instances", + "reporter": "REPORTER", + "value": 23 + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid." + } + } + } + }, + "/metrics/task-worker": { + "delete": { + "operationId": "deleteTaskMetrics", + "tags": [ + "Metrics" + ], + "summary": "Delete Task Worker Metrics", + "description": "Deletes all task worker metrics prior to the given date or all if no date is provided.", + "parameters": [ + { + "name": "date", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "The date prior to which all task worker metrics should be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the user who performs the operation is not a \u003cb\u003ecamunda-admin\u003c/b\u003e user." + } + } + } + }, + "/metrics/{metrics-name}/sum": { + "get": { + "operationId": "getMetrics", + "tags": [ + "Metrics" + ], + "summary": "Get Sum", + "description": "Retrieves the `sum` (count) for a given metric.", + "parameters": [ + { + "name": "metrics-name", + "in": "path", + "schema": { + "enum": [ + "activity-instance-start", + "activity-instance-end", + "decision-instances", + "flow-node-instances", + "job-acquisition-attempt", + "job-acquired-success", + "job-acquired-failure", + "job-execution-rejected", + "job-successful", + "job-failed", + "job-locked-exclusive", + "executed-decision-elements", + "history-cleanup-removed-process-instances", + "history-cleanup-removed-case-instances", + "history-cleanup-removed-decision-instances", + "history-cleanup-removed-batch-operations", + "history-cleanup-removed-task-metrics", + "unique-task-workers", + "process-instances", + "task-users" + ], + "type": "string" + }, + "required": true, + "description": "The name of the metric." + }, + { + "name": "startDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "The start date (inclusive)." + }, + { + "name": "endDate", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "The end date (exclusive)." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetricsResultDto" + }, + "examples": { + "example-1": { + "summary": "GET /metrics/activity-instance-end/sum?startDate\u003d2015-01-01T00:00:00.000%2b0200", + "value": { + "result": 4342343241 + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/migration/execute": { + "post": { + "operationId": "executeMigrationPlan", + "tags": [ + "Migration" + ], + "summary": "Execute Migration Plan", + "description": "Executes a migration plan synchronously for multiple process instances. To execute\na migration plan asynchronously, use the\n[Execute Migration Plan Async(Batch)](https://docs.camunda.org/manual/7.22/reference/rest/migration/execute-migration-async/)\nmethod.\n\nFor more information about the difference between synchronous and asynchronous\nexecution of a migration plan, please refer to the related section of\n[the user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-migration/#executing-a-migration-plan).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationExecutionDto" + }, + "examples": { + "example-1": { + "summary": "POST `/migration/execute`", + "value": { + "migrationPlan": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ] + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "[5,9]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + }, + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId1" + }, + "skipCustomListeners": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The request is not valid if one or more of the following statements apply:\n\n* The provided migration plan is not valid, so an exception of type\n`MigrationPlanValidationException` is returned.\n* The provided migration plan is not valid for a specific process\ninstance it is applied to, so an exception of type\n`MigratingProcessInstanceValidationException` is returned.\n* In case additional parameters of the request are unexpected, an\nexception of type `InvalidRequestException` is returned.\n\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/migration/executeAsync": { + "post": { + "operationId": "executeMigrationPlanAsync", + "tags": [ + "Migration" + ], + "summary": "Execute Migration Plan Async (Batch)", + "description": "Executes a migration plan asynchronously (batch) for multiple process instances.\nTo execute a migration plan synchronously, use the\n[Execute MigrationPlan](https://docs.camunda.org/manual/7.22/reference/rest/migration/execute-migration/)\nmethod.\n\nFor more information about the difference between synchronous and asynchronous\nexecution of a migration plan, please refer to the related section of\n[the user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-migration/#executing-a-migration-plan).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationExecutionDto" + }, + "examples": { + "example-1": { + "summary": "POST `/migration/executeAsync`", + "value": { + "migrationPlan": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ] + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "[5,9]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + }, + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId1" + }, + "skipCustomListeners": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/migration/executeAsync`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The request is not valid if one or more of the following statements apply:\n\n* The provided migration plan is not valid, so an exception of type\n`MigrationPlanValidationException` is returned.\n* In case additional parameters of the request are unexpected, an\nexception of type `InvalidRequestException` is returned.\n\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/migration/generate": { + "post": { + "operationId": "generateMigrationPlan", + "tags": [ + "Migration" + ], + "summary": "Generate Migration Plan", + "description": "Generates a migration plan for two process definitions. The generated migration\nplan contains migration instructions which map equal activities\nbetween the\ntwo process definitions.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationPlanGenerationDto" + }, + "examples": { + "example-1": { + "summary": "POST `/migration/generate`", + "value": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "updateEventTriggers": true, + "variables": { + "foo": { + "type": "Object", + "value": "[5,6]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationPlanDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/migration/generate`", + "value": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ], + "updateEventTrigger": false + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "[5,6]", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/json" + } + } + } + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nThe requested migration was invalid. See\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/migration/validate": { + "post": { + "operationId": "validateMigrationPlan", + "tags": [ + "Migration" + ], + "summary": "Validate Migration Plan", + "description": "Validates a migration plan statically without executing it. This\ncorresponds to the\n[creation time validation](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-migration/#creation-time-validation)\ndescribed in the user guide.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationPlanDto" + }, + "examples": { + "example-1": { + "summary": "POST `/migration/validate`", + "value": { + "sourceProcessDefinitionId": "aProcessDefinitionId1", + "targetProcessDefinitionId": "aProcessDefinitionId2", + "instructions": [ + { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ] + }, + { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + } + ], + "variables": { + "foo": { + "type": "Object", + "value": "...", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/x-java-serialized-object" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrationPlanReportDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/migration/validate`", + "value": { + "instructionReports": [ + { + "instruction": { + "sourceActivityIds": [ + "aUserTask" + ], + "targetActivityIds": [ + "aUserTask" + ], + "updateEventTrigger": false + }, + "failures": [ + "failure1", + "failure2" + ] + }, + { + "instruction": { + "sourceActivityIds": [ + "anEvent" + ], + "targetActivityIds": [ + "anotherEvent" + ], + "updateEventTrigger": true + }, + "failures": [ + "failure1", + "failure2" + ] + } + ], + "variableReports": { + "foo": { + "type": "Object", + "value": "...", + "valueInfo": { + "objectTypeName": "java.util.ArrayList", + "serializationDataFormat": "application/x-java-serialized-object" + }, + "failures": [ + "Cannot set variable with name foo. Java serialization format is prohibited" + ] + } + } + } + } + } + } + }, + "description": "Request successful. The validation report was returned." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case additional parameters of the request are unexpected, an\nexception of type `InvalidRequestException` is returned. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/modification/execute": { + "post": { + "operationId": "executeModification", + "tags": [ + "Modification" + ], + "summary": "Execute Modification", + "description": "Executes a modification synchronously for multiple process instances.\nTo modify a single process instance, use the\n[Modify Process Instance Execution State](https://docs.camunda.org/manual/7.22/reference/rest/process-instance/post-modification/) method.\nTo execute a modification asynchronously, use the\n[Execute Modification Async (Batch)](https://docs.camunda.org/manual/7.22/reference/rest/modification/post-modification-async/) method.\n\nFor more information about the difference between synchronous and\nasynchronous execution of a modification, please refer to the related\nsection of the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-migration.md#executing-a-migration-plan).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationDto" + }, + "examples": { + "example-1": { + "summary": "POST `/modification/execute`", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + }, + { + "type": "cancel", + "activityId": "anotherTask", + "cancelCurrentActiveActivityInstances": true + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId" + }, + "skipCustomListeners": true, + "annotation": "Modified to resolve an error." + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nIn case following parameters are missing: instructions,\nprocessDefinitionId, activityId or transitionId, processInstanceIds\nor processInstanceQuery, an exception of type\n`InvalidRequestException` is returned. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/modification/executeAsync": { + "post": { + "operationId": "executeModificationAsync", + "tags": [ + "Modification" + ], + "summary": "Execute Modification Async (Batch)", + "description": "Executes a modification asynchronously for multiple process instances. To execute a\nmodification synchronously, use the\n[Execute Modification](https://docs.camunda.org/manual/7.22/reference/rest/modification/post-modification-sync/) method.\n\nFor more information about the difference between synchronous and\nasynchronous execution of a modification, please refer to the related\nsection of the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-migration.md#executing-a-migration-plan).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationDto" + }, + "examples": { + "example-1": { + "summary": "POST `/modification/executeAsync`", + "value": { + "processDefinitionId": "aProcessDefinitionId", + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + }, + { + "type": "cancel", + "activityId": "anotherTask", + "cancelCurrentActiveActivityInstances": true + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId" + }, + "skipCustomListeners": true, + "annotation": "Modified to resolve an error." + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "POST `/modification/executeAsync`", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "\nIn case following parameters are missing: instructions,\nprocessDefinitionId, activityId or transitionId, processInstanceIds\nor processInstanceQuery, an exception of type\n`InvalidRequestException` is returned. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format.\n" + } + } + } + }, + "/process-definition": { + "get": { + "operationId": "getProcessDefinitions", + "tags": [ + "Process Definition" + ], + "summary": "Get List", + "description": "Queries for process definitions that fulfill given parameters. Parameters may be the properties of \nprocess definitions, such as the name, key or version. The size of the result set can be retrieved\nby using the [Get Definition Count](https://docs.camunda.org/manual/7.22/reference/rest/process-definition/get-query-count/) method.", + "parameters": [ + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "deployedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the process definition belongs to.\nOnly selects process definitions that have been deployed after (exclusive) a specific time.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "deployedAt", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the process definition belongs to.\nOnly selects process definitions that have been deployed at a specific time (exact match).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key, i.e., the id in the BPMN 2.0 XML. Exact match." + }, + { + "name": "keysIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition keys." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition categories that the parameter is a substring of." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by process definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those process definitions that are latest versions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the process definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those process definition resources that the parameter is a substring of." + }, + { + "name": "startableBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a user name who is allowed to start the process." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active process definitions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended process definitions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nA process definition must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions which belong to no tenant.\nValue may only be true, as false is the default behavior." + }, + { + "name": "includeProcessDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include process definitions which belong to no tenant. Can be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "versionTag", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag." + }, + { + "name": "versionTagLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag that the parameter is a substring of." + }, + { + "name": "withoutVersionTag", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions without a `versionTag`." + }, + { + "name": "startableInTasklist", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which are startable in Tasklist.." + }, + { + "name": "notStartableInTasklist", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which are not startable in Tasklist." + }, + { + "name": "startablePermissionCheck", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which the user is allowed to start in Tasklist.\nIf the user doesn\u0027t have these permissions the result will be empty list.\nThe permissions are:\n* `CREATE` permission for all Process instances\n* `CREATE_INSTANCE` and `READ` permission on Process definition level" + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "category", + "key", + "id", + "name", + "version", + "deploymentId", + "deployTime", + "tenantId ", + "versionTag" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition?keyLike\u003dinvoice\u0026sortBy\u003dversion\u0026sortOrder\u003dasc`", + "value": [ + { + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + }, + { + "id": "invoice:2:c3e1bd16-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 2, + "resource": "invoice.v2.bpmn", + "deploymentId": "c3d82020-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "startableInTasklist": true + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/count": { + "get": { + "operationId": "getProcessDefinitionsCount", + "tags": [ + "Process Definition" + ], + "summary": "Get List Count", + "description": "Requests the number of process definitions that fulfill the query criteria.\nTakes the same filtering parameters as the [Get Definitions](https://docs.camunda.org/manual/7.22/reference/rest/process-definition/get-query/) method.", + "parameters": [ + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition id." + }, + { + "name": "processDefinitionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition ids." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition names that the parameter is a substring of." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "deployedAfter", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the process definition belongs to.\nOnly selects process definitions that have been deployed after (exclusive) a specific time.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "deployedAt", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "Filter by the deploy time of the deployment the process definition belongs to.\nOnly selects process definitions that have been deployed at a specific time (exact match).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "key", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition key, i.e., the id in the BPMN 2.0 XML. Exact match." + }, + { + "name": "keysIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition keys." + }, + { + "name": "keyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition keys that the parameter is a substring of." + }, + { + "name": "category", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition category. Exact match." + }, + { + "name": "categoryLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process definition categories that the parameter is a substring of." + }, + { + "name": "version", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + }, + "description": "Filter by process definition version." + }, + { + "name": "latestVersion", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include those process definitions that are latest versions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "resourceName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the process definition resource. Exact match." + }, + { + "name": "resourceNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by names of those process definition resources that the parameter is a substring of." + }, + { + "name": "startableBy", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a user name who is allowed to start the process." + }, + { + "name": "active", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include active process definitions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include suspended process definitions.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nA process definition must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions which belong to no tenant.\nValue may only be true, as false is the default behavior." + }, + { + "name": "includeProcessDefinitionsWithoutTenantId", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Include process definitions which belong to no tenant. Can be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + { + "name": "versionTag", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag." + }, + { + "name": "versionTagLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the version tag that the parameter is a substring of." + }, + { + "name": "withoutVersionTag", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Only include process definitions without a `versionTag`." + }, + { + "name": "startableInTasklist", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which are startable in Tasklist.." + }, + { + "name": "notStartableInTasklist", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which are not startable in Tasklist." + }, + { + "name": "startablePermissionCheck", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Filter by process definitions which the user is allowed to start in Tasklist.\nIf the user doesn\u0027t have these permissions the result will be empty list.\nThe permissions are:\n* `CREATE` permission for all Process instances\n* `CREATE_INSTANCE` and `READ` permission on Process definition level" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/count?keyLike\u003dKey\u0026version\u003d47`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}": { + "delete": { + "operationId": "deleteProcessDefinitionsByKey", + "tags": [ + "Process Definition" + ], + "summary": "Delete By Key", + "description": "Deletes process definitions by a given key which belong to no tenant id.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definitions to be deleted." + }, + { + "name": "cascade", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "`true`, if all process instances, historic process instances and jobs\nfor this process definition should be deleted." + }, + { + "name": "skipCustomListeners", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if only the built-in ExecutionListeners should be notified with the end event." + }, + { + "name": "skipIoMappings", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "A boolean value to control whether input/output mappings should be executed during deletion.\n`true`, if input/output mappings should not be invoked." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Forbidden\nThe process definitions with the given `key` cannot be deleted due to missing permissions.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nProcess definition with given `key` does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getProcessDefinitionByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get", + "description": "Retrieves the latest version of the process definition which belongs to no tenant according to the `ProcessDefinition` interface in the engine.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/key/invoice`", + "value": { + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given `key` does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/deployed-start-form": { + "get": { + "operationId": "getDeployedStartFormByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Deployed Start Form", + "description": "Retrieves the deployed form that can be referenced from a start event.\nFor further information please refer to [User Guide](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#embedded-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET `/process-definition/key/processDefinitionKey/deployed-start-form`", + "value": "\u003cform role\u003d\"form\" name\u003d\"invoiceForm\"\n class\u003d\"form-horizontal\"\u003e\n\n \u003cdiv class\u003d\"form-group\"\u003e\n \u003clabel class\u003d\"control-label col-md-4\"\n for\u003d\"creditor\"\u003eCreditor\u003c/label\u003e\n \u003cdiv class\u003d\"col-md-8\"\u003e\n \u003cinput cam-variable-name\u003d\"creditor\"\n cam-variable-type\u003d\"String\"\n id\u003d\"creditor\"\n class\u003d\"form-control\"\n type\u003d\"text\"\n required /\u003e\n \u003cdiv class\u003d\"help\"\u003e\n (e.g. \u0026quot;Great Pizza for Everyone Inc.\u0026quot;)\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The form key has wrong format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The deployed start form cannot be retrieved due to missing permissions on process definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No deployed start form for a given process definition exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/diagram": { + "get": { + "operationId": "getProcessDefinitionDiagramByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Diagram", + "description": "Retrieves the diagram for the latest version of the process definition which belongs to no tenant.\n\nIf the process definition\u0027s deployment contains an image resource with the same file name\nas the process definition, the deployed image will be returned by the Get Diagram endpoint.\nExample: `someProcess.bpmn` and `someProcess.png`.\nSupported file extentions for the image are: `svg`, `png`, `jpg`, and `gif`.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The process definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/form-variables": { + "get": { + "operationId": "getStartFormVariablesByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Variables", + "description": "Retrieves the start form variables for the latest process definition which belongs to no tenant\n(only if they are defined via the \n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms) approach).\nThe start form variables take form data specified on the start event into account.\nIf form fields are defined, the variable types and default values\nof the form fields are taken into account.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "variableNames", + "in": "query", + "schema": { + "type": "string" + }, + "description": "A comma-separated list of variable names. Allows restricting the list of requested\nvariables to the variable names in the list. It is best practice to restrict the\nlist of variables to the variables actually required by the form in order to\nminimize fetching of data. If the query parameter is ommitted all variables are\nfetched. If the query parameter contains non-existent variable names, the variable\nnames are ignored." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store\ncustom Java objects) should be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and\ntransformed to JSON using [Jackson\u0027s](http://jackson.codehaus.org/) POJO/bean\nproperty introspection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string\ncontaining XML.\n\n**Note**: While true is the default value for reasons of backward compatibility, we\nrecommend setting this parameter to false when developing web applications that are\nindependent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `/process-definition/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + } + } + } + } + }, + "description": "Request successful. A JSON object containing a property for each variable returned." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The key is null or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByProcessDefinitionKey", + "tags": [ + "Process Definition" + ], + "summary": "Update History Time to Live", + "description": "Updates history time to live for the latest version of the process definition which belongs to no tenant.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).\nThe value of the update is mandatory by default and does not allow `null` values. To enable them, please\nset the feature flag `enforceHistoryTimeToLive` to `false`. Read more in [Configuration Properties]\n(https://docs.camunda.org/manual/7.22/reference/deployment-descriptors/tags/process-engine#configuration-properties)", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition to change history time to live." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/rendered-form": { + "get": { + "operationId": "getRenderedStartFormByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Rendered Start Form", + "description": "Retrieves the rendered form for the latest version of the process definition which belongs to no tenant.\nThis method can be used to get the HTML rendering of a\n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "A `/process-definition/key/anKey/rendered-form` HTML\n GET response body providing the rendered (generated) form content.", + "value": "\u003cform class\u003d\"form-horizontal\"\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eCustomer ID\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"string\" name\u003d\"customerId\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eAmount\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"number\" name\u003d\"amount\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no form field metadata defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/start": { + "post": { + "operationId": "startProcessInstanceByKey", + "tags": [ + "Process Definition" + ], + "summary": "Start Instance", + "description": "Instantiates a given process definition, starts the latest version of the process definition\nwhich belongs to no tenant.\nProcess variables and business key may be supplied in the request body.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Starting a process instance at its default initial activity", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + }, + "example-2": { + "summary": "Starting a process instance with variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey", + "withVariablesInReturn": true + } + }, + "example-3": { + "summary": "Starting a process instance at two specific activities", + "value": { + "variables": { + "aProcessVariable": { + "value": "aStringValue", + "type": "String" + } + }, + "businessKey": "myBusinessKey", + "skipCustomListeners": true, + "startInstructions": [ + { + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String" + } + } + }, + { + "type": "startAfterActivity", + "activityId": "anotherActivityId", + "variables": { + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceWithVariablesDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "Response for starting a process instance at its default initial activity", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + }, + "example-2": { + "summary": "Status 200 Response 2", + "description": "Response for starting a process instance with variables in return", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/aProcInstId", + "rel": "self" + } + ], + "id": "aProcInstId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": null, + "variables": { + "anotherVariable": { + "type": "Boolean", + "value": true, + "valueInfo": { + "transient": true + } + }, + "aVariable": { + "type": "String", + "value": "aStringValue", + "valueInfo": {} + } + } + } + }, + "example-3": { + "summary": "Status 200 Response 3", + "description": "Response for starting a process instance at two specific activities", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/startForm": { + "get": { + "operationId": "getStartFormByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Key", + "description": "Retrieves the key of the start form for the latest version of the process definition\nwhich belongs to no tenant.\nThe form key corresponds to the `FormData#formKey` property in the engine.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) for which the form key is to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `process-definition/key/aKey/startForm`", + "value": { + "key": "aFormKey", + "contextPath": "http://localhost:8080/my-process-application/" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no start form defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/statistics": { + "get": { + "operationId": "getActivityStatisticsByProcessDefinitionKey", + "tags": [ + "Process Definition" + ], + "summary": "Get Activity Instance Statistics", + "description": "Retrieves runtime statistics of the latest version of the given process definition\nwhich belongs to no tenant, grouped by activities.\nThese statistics include the number of running activity instances, optionally the number of failed jobs\nand also optionally the number of incidents either grouped by incident types or\nfor a specific incident type.\n**Note**: This does not include historic data.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "failedJobs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of failed jobs in the result or not. Valid values are `true` or `false`." + }, + { + "name": "incidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Valid values for this property are `true` or `false`.\nIf this property has been set to `true` the result will include the corresponding number of incidents\nfor each occurred incident type.\nIf it is set to `false`, the incidents will not be included in the result.\nCannot be used in combination with `incidentsForType`." + }, + { + "name": "incidentsForType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "If this property has been set with any incident type (i.e., a string value) the result\nwill only include the number of incidents for the assigned incident type.\nCannot be used in combination with `incidents`.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityStatisticsResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/statistics?failedJobs\u003dtrue", + "description": "Request with Query Parameter `failedJobs\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 42, + "incidents": [] + }, + { + "id": "anotherActivity", + "instances": 124, + "failedJobs": 43, + "incidents": [] + } + ] + }, + "example-2": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/statistics?incidents\u003dtrue", + "description": "Request with Query Parameter `incidents\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 42 + }, + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + }, + { + "id": "anotherActivity", + "instances": 124, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 43 + }, + { + "incidentType": "anIncident", + "incidentCount": 22 + }, + { + "incidentType": "anotherIncident", + "incidentCount": 15 + } + ] + } + ] + }, + "example-3": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/statistics?incidentsForType\u003danIncident", + "description": "Request with Query Parameter `incidentsForType\u003danIncident`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/submit-form": { + "post": { + "operationId": "submitFormByKey", + "tags": [ + "Process Definition" + ], + "summary": "Submit Start Form", + "description": "Starts the latest version of the process definition which belongs to no tenant\nusing a set of process variables and the business key.\nIf the start event has Form Field Metadata defined, the process engine will perform backend validation\nfor any form fields which have validators defined.\nSee [Documentation on Generated Task Forms](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition to submit the form for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceFormDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-definition/key/aProcessDefinitionKey/submit-form`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "POST `/process-definition/key/aProcessDefinitionKey/submit-form`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/suspended": { + "put": { + "operationId": "updateProcessDefinitionSuspensionStateByKey", + "tags": [ + "Process Definition" + ], + "summary": "Activate/Suspend by Id", + "description": "Activates or suspends a given process definition by latest version of process definition key\nwhich belongs to no tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be activated/suspended." + } + ], + "requestBody": { + "description": "**Note**: Unallowed properties are `processDefinitionId` and `processDefinitionKey`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/suspended`", + "value": { + "suspended": true, + "includeProcessInstances": true, + "executionDate": "2013-11-21T10:49:45T14:42:45" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if the provided `executionDate` parameter doesn\u0027t have the expected format or\nif the `processDefinitionKey` parameter is `null`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}": { + "delete": { + "operationId": "deleteProcessDefinitionsByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Delete By Key", + "description": "Deletes process definitions by a given key and which belong to a tenant id.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definitions to be deleted." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definitions belong to." + }, + { + "name": "cascade", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "`true`, if all process instances, historic process instances and jobs\nfor this process definition should be deleted." + }, + { + "name": "skipCustomListeners", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if only the built-in ExecutionListeners should be notified with the end event." + }, + { + "name": "skipIoMappings", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "A boolean value to control whether input/output mappings should be executed during deletion.\n`true`, if input/output mappings should not be invoked." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Forbidden\nThe process definitions with the given `key` cannot be deleted due to missing permissions.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nProcess definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getLatestProcessDefinitionByTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get", + "description": "Retrieves the latest version of the process definition for tenant according to\nthe `ProcessDefinition` interface in the engine.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/key/invoice/tenant-id/tenantOne`", + "value": { + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": "tenantOne", + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given `key` does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/deployed-start-form": { + "get": { + "operationId": "getDeployedStartFormByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Deployed Start Form", + "description": "Retrieves the deployed form that can be referenced from a start event.\nFor further information please refer to [User Guide](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#embedded-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definitions belong to." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET\n `/process-definition/key/processDefinitionKey/tenant-id/tenantId/deployed-start-form`", + "value": "\u003cform role\u003d\"form\" name\u003d\"invoiceForm\"\n class\u003d\"form-horizontal\"\u003e\n\n \u003cdiv class\u003d\"form-group\"\u003e\n \u003clabel class\u003d\"control-label col-md-4\"\n for\u003d\"creditor\"\u003eCreditor\u003c/label\u003e\n \u003cdiv class\u003d\"col-md-8\"\u003e\n \u003cinput cam-variable-name\u003d\"creditor\"\n cam-variable-type\u003d\"String\"\n id\u003d\"creditor\"\n class\u003d\"form-control\"\n type\u003d\"text\"\n required /\u003e\n \u003cdiv class\u003d\"help\"\u003e\n (e.g. \u0026quot;Great Pizza for Everyone Inc.\u0026quot;)\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The form key has wrong format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The deployed start form cannot be retrieved due to missing permissions on process definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No deployed start form for a given process definition exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/diagram": { + "get": { + "operationId": "getProcessDefinitionDiagramByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Diagram", + "description": "Retrieves the diagram for the latest version of the process definition for tenant.\n\nIf the process definition\u0027s deployment contains an image resource with the same file name\nas the process definition, the deployed image will be returned by the Get Diagram endpoint.\nExample: `someProcess.bpmn` and `someProcess.png`.\nSupported file extentions for the image are: `svg`, `png`, `jpg`, and `gif`.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The process definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/form-variables": { + "get": { + "operationId": "getStartFormVariablesByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Variables", + "description": "Retrieves the start form variables for the latest process definition for a tenant\n(only if they are defined via the \n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms) approach).\nThe start form variables take form data specified on the start event into account.\nIf form fields are defined, the variable types and default values\nof the form fields are taken into account.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + }, + { + "name": "variableNames", + "in": "query", + "schema": { + "type": "string" + }, + "description": "A comma-separated list of variable names. Allows restricting the list of requested\nvariables to the variable names in the list. It is best practice to restrict the\nlist of variables to the variables actually required by the form in order to\nminimize fetching of data. If the query parameter is ommitted all variables are\nfetched. If the query parameter contains non-existent variable names, the variable\nnames are ignored." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store\ncustom Java objects) should be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and\ntransformed to JSON using [Jackson\u0027s](http://jackson.codehaus.org/) POJO/bean\nproperty introspection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string\ncontaining XML.\n\n**Note**: While true is the default value for reasons of backward compatibility, we\nrecommend setting this parameter to false when developing web applications that are\nindependent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `/process-definition/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + } + } + } + } + }, + "description": "Request successful. A JSON object containing a property for each variable returned." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The key is null or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByProcessDefinitionKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Update History Time to Live", + "description": "Updates history time to live for the latest version of the process definition for a tenant.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition to change history time to live." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/rendered-form": { + "get": { + "operationId": "getRenderedStartFormByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Rendered Start Form", + "description": "Retrieves the rendered form for the latest version of the process definition for a tenant.\nThis method can be used to get the HTML rendering of a\n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "A `/process-definition/key/anKey/tenand-id/aTenantId/rendered-form` HTML\n GET response body providing the rendered (generated) form content.", + "value": "\u003cform class\u003d\"form-horizontal\"\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eCustomer ID\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"string\" name\u003d\"customerId\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eAmount\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"number\" name\u003d\"amount\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no form field metadata defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/start": { + "post": { + "operationId": "startProcessInstanceByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Start Instance", + "description": "Instantiates a given process definition, starts the latest version of the process definition for tenant.\nProcess variables and business key may be supplied in the request body.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Starting a process instance at its default initial activity", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + }, + "example-2": { + "summary": "Starting a process instance with variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey", + "withVariablesInReturn": true + } + }, + "example-3": { + "summary": "Starting a process instance at two specific activities", + "value": { + "variables": { + "aProcessVariable": { + "value": "aStringValue", + "type": "String" + } + }, + "businessKey": "myBusinessKey", + "skipCustomListeners": true, + "startInstructions": [ + { + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String" + } + } + }, + { + "type": "startAfterActivity", + "activityId": "anotherActivityId", + "variables": { + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceWithVariablesDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "Response for starting a process instance at its default initial activity", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + }, + "example-2": { + "summary": "Status 200 Response 2", + "description": "Response for starting a process instance with variables in return", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/aProcInstId", + "rel": "self" + } + ], + "id": "aProcInstId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": null, + "variables": { + "anotherVariable": { + "type": "Boolean", + "value": true, + "valueInfo": { + "transient": true + } + }, + "aVariable": { + "type": "String", + "value": "aStringValue", + "valueInfo": {} + } + } + } + }, + "example-3": { + "summary": "Status 200 Response 3", + "description": "Response for starting a process instance at two specific activities", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/startForm": { + "get": { + "operationId": "getStartFormByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Key", + "description": "Retrieves the key of the start form for the latest version of the process definition for a tenant.\nThe form key corresponds to the `FormData#formKey` property in the engine.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) for which the form key is to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `process-definition/key/aKey/tenant-id/aTenantId/startForm`", + "value": { + "key": "aFormKey", + "contextPath": "http://localhost:8080/my-process-application/" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no start form defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/statistics": { + "get": { + "operationId": "getActivityStatisticsByProcessDefinitionKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get Activity Instance Statistics", + "description": "Retrieves runtime statistics of the latest version of the given process definition for a tenant,\ngrouped by activities.\nThese statistics include the number of running activity instances, optionally the number of failed jobs\nand also optionally the number of incidents either grouped by incident types or\nfor a specific incident type.\n**Note**: This does not include historic data.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + }, + { + "name": "failedJobs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of failed jobs in the result or not. Valid values are `true` or `false`." + }, + { + "name": "incidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Valid values for this property are `true` or `false`.\nIf this property has been set to `true` the result will include the corresponding number of incidents\nfor each occurred incident type.\nIf it is set to `false`, the incidents will not be included in the result.\nCannot be used in combination with `incidentsForType`." + }, + { + "name": "incidentsForType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "If this property has been set with any incident type (i.e., a string value) the result\nwill only include the number of incidents for the assigned incident type.\nCannot be used in combination with `incidents`.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityStatisticsResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/statistics?failedJobs\u003dtrue", + "description": "Request with Query Parameter `failedJobs\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 42, + "incidents": [] + }, + { + "id": "anotherActivity", + "instances": 124, + "failedJobs": 43, + "incidents": [] + } + ] + }, + "example-2": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/statistics?incidents\u003dtrue", + "description": "Request with Query Parameter `incidents\u003dtrue`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 42 + }, + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + }, + { + "id": "anotherActivity", + "instances": 124, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 43 + }, + { + "incidentType": "anIncident", + "incidentCount": 22 + }, + { + "incidentType": "anotherIncident", + "incidentCount": 15 + } + ] + } + ] + }, + "example-3": { + "summary": "GET /process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/statistics?incidentsForType\u003danIncident", + "description": "Request with Query Parameter `incidentsForType\u003danIncident`", + "value": [ + { + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/submit-form": { + "post": { + "operationId": "submitFormByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Submit Start Form", + "description": "Starts the latest version of the process definition for a tenant\nusing a set of process variables and the business key.\nIf the start event has Form Field Metadata defined, the process engine will perform backend validation\nfor any form fields which have validators defined.\nSee [Documentation on Generated Task Forms](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition to submit the form for." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceFormDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/submit-form`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "POST `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/submit-form`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/suspended": { + "put": { + "operationId": "updateProcessDefinitionSuspensionStateByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Activate/Suspend by Id", + "description": "Activates or suspends a given process definition by the latest version of\nthe process definition for tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) to be activated/suspended." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "requestBody": { + "description": "**Note**: Unallowed properties are `processDefinitionId` and `processDefinitionKey`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/suspended`", + "value": { + "suspended": true, + "includeProcessInstances": true, + "executionDate": "2013-11-21T10:49:45T14:42:45" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if the provided `executionDate` parameter doesn\u0027t have the expected format or\nif the `processDefinitionKey` parameter is `null`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/tenant-id/{tenant-id}/xml": { + "get": { + "operationId": "getProcessDefinitionBpmn20XmlByKeyAndTenantId", + "tags": [ + "Process Definition" + ], + "summary": "Get XML", + "description": "Retrieves latest version the BPMN 2.0 XML of a process definition.\nReturns the XML for the latest version of the process definition for tenant.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) whose XML should be retrieved." + }, + { + "name": "tenant-id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant the process definition belongs to." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-definition/key/aProcessDefinitionKey/tenant-id/aTenantId/xml`", + "value": { + "id": "anProcessDefinitionId", + "bpmn20Xml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n\u003cdefinitions\n xmlns\u003d\"http://www.omg.org/spec/BPMN/20100524/MODEL\"\n xmlns:camunda\u003d\"http://camunda.org/schema/1.0/bpmn\"\n targetNamespace\u003d\"Examples\"\u003e\n \u003cprocess id\u003d\"oneTaskProcess\" isExecutable\u003d\"true\"\u003e\n \u003cstartEvent id\u003d\"theStart\" /\u003e\n \u003csequenceFlow id\u003d\"flow1\" sourceRef\u003d\"theStart\" targetRef\u003d\"theEnd\" /\u003e\n \u003cendEvent id\u003d\"theEnd\" /\u003e\n \u003c/process\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The Process Definition xml cannot be retrieved due to missing permissions on the Process Definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/key/{key}/xml": { + "get": { + "operationId": "getProcessDefinitionBpmn20XmlByKey", + "tags": [ + "Process Definition" + ], + "summary": "Get XML", + "description": "Retrieves latest version the BPMN 2.0 XML of a process definition.", + "parameters": [ + { + "name": "key", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The key of the process definition (the latest version thereof) whose XML should be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-definition/key/aProcessDefinitionKey/xml`", + "value": { + "id": "anProcessDefinitionId", + "bpmn20Xml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n\u003cdefinitions\n xmlns\u003d\"http://www.omg.org/spec/BPMN/20100524/MODEL\"\n xmlns:camunda\u003d\"http://camunda.org/schema/1.0/bpmn\"\n targetNamespace\u003d\"Examples\"\u003e\n \u003cprocess id\u003d\"oneTaskProcess\" isExecutable\u003d\"true\"\u003e\n \u003cstartEvent id\u003d\"theStart\" /\u003e\n \u003csequenceFlow id\u003d\"flow1\" sourceRef\u003d\"theStart\" targetRef\u003d\"theEnd\" /\u003e\n \u003cendEvent id\u003d\"theEnd\" /\u003e\n \u003c/process\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The Process Definition xml cannot be retrieved due to missing permissions on the Process Definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/statistics": { + "get": { + "operationId": "getProcessDefinitionStatistics", + "tags": [ + "Process Definition" + ], + "summary": "Get Process Instance Statistics", + "description": "Retrieves runtime statistics of the process engine, grouped by process definitions.\nThese statistics include the number of running process instances, optionally the number of failed jobs\nand also optionally the number of incidents either grouped by incident types or\nfor a specific incident type.\n**Note**: This does not include historic data.", + "parameters": [ + { + "name": "failedJobs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of failed jobs in the result or not. Valid values are `true` or `false`." + }, + { + "name": "incidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Valid values for this property are `true` or `false`.\nIf this property has been set to `true` the result will include the corresponding number of incidents\nfor each occurred incident type.\nIf it is set to `false`, the incidents will not be included in the result.\nCannot be used in combination with `incidentsForType`." + }, + { + "name": "incidentsForType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "If this property has been set with any incident type (i.e., a string value) the result\nwill only include the number of incidents for the assigned incident type.\nCannot be used in combination with `incidents`.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "rootIncidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Valid values for this property are `true` or `false`.\nIf this property has been set to `true` the result will include the corresponding number of\nroot incidents for each occurred incident type.\nIf it is set to `false`, the incidents will not be included in the result.\nCannot be used in combination with `incidentsForType` or `incidents`." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessDefinitionStatisticsResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /process-definition/statistics?failedJobs\u003dtrue", + "description": "Request with Query Parameter `failedJobs\u003dtrue`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId", + "instances": 123, + "failedJobs": 42, + "definition": { + "id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [] + }, + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId:2", + "instances": 124, + "failedJobs": 43, + "definition": { + "id": "aProcessDefinitionId:2", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [] + } + ] + }, + "example-2": { + "summary": "GET /process-definition/statistics?incidents\u003dtrue", + "description": "Request with Query Parameter `incidents\u003dtrue`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId", + "instances": 123, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 42 + }, + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + }, + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId:2", + "instances": 124, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId:2", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 43 + }, + { + "incidentType": "anIncident", + "incidentCount": 22 + }, + { + "incidentType": "anotherIncident", + "incidentCount": 15 + } + ] + } + ] + }, + "example-3": { + "summary": "GET /process-definition/statistics?incidentsForType\u003danIncident", + "description": "Request with Query Parameter `incidentsForType\u003danIncident`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId", + "instances": 123, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [ + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + } + ] + }, + "example-4": { + "summary": "GET /process-definition/statistics?rootIncidents\u003dtrue", + "description": "Request with Query Parameter `rootIncidents\u003dtrue`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ProcessDefinitionStatisticsResultDto", + "id": "aProcessDefinitionId", + "instances": 123, + "failedJobs": 0, + "definition": { + "id": "aProcessDefinitionId", + "key": "aKey", + "category": null, + "description": null, + "name": "aName", + "version": 0, + "resource": null, + "deploymentId": null, + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": "1.0.0", + "historyTimeToLive": null, + "startableInTasklist": false + }, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 62 + }, + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/suspended": { + "put": { + "operationId": "updateProcessDefinitionSuspensionState", + "tags": [ + "Process Definition" + ], + "summary": "Activate/Suspend By Key", + "description": "Activates or suspends process definitions with the given process definition key.", + "requestBody": { + "description": "**Note**: Unallowed property is `processDefinitionId`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/suspended`", + "value": { + "processDefinitionKey": "aProcessDefinitionKey", + "suspended": true, + "includeProcessInstances": true, + "executionDate": "2013-11-21T10:49:45T14:42:45" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if the provided `executionDate` parameter doesn\u0027t have the expected format or\nif the `processDefinitionKey` parameter is `null`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}": { + "delete": { + "operationId": "deleteProcessDefinition", + "tags": [ + "Process Definition" + ], + "summary": "Delete", + "description": "Deletes a running process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to be deleted." + }, + { + "name": "cascade", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "`true`, if all process instances, historic process instances and jobs\nfor this process definition should be deleted." + }, + { + "name": "skipCustomListeners", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "`true`, if only the built-in ExecutionListeners should be notified with the end event." + }, + { + "name": "skipIoMappings", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "A boolean value to control whether input/output mappings should be executed during deletion.\n`true`, if input/output mappings should not be invoked." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nProcess definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getProcessDefinition", + "tags": [ + "Process Definition" + ], + "summary": "Get", + "description": "Retrieves a process definition according to the `ProcessDefinition` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response of GET `/process-definition/invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e`", + "value": { + "id": "invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e", + "key": "invoice", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "Invoice Receipt", + "version": 1, + "resource": "invoice.v1.bpmn", + "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": 5, + "startableInTasklist": true + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given `id` does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/deployed-start-form": { + "get": { + "operationId": "getDeployedStartForm", + "tags": [ + "Process Definition" + ], + "summary": "Get Deployed Start Form", + "description": "Retrieves the deployed form that can be referenced from a start event.\nFor further information please refer to [User Guide](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#embedded-task-forms).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to get the deployed start form for." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET `/process-definition/processDefinitionId/deployed-start-form`", + "value": "\u003cform role\u003d\"form\" name\u003d\"invoiceForm\"\n class\u003d\"form-horizontal\"\u003e\n\n \u003cdiv class\u003d\"form-group\"\u003e\n \u003clabel class\u003d\"control-label col-md-4\"\n for\u003d\"creditor\"\u003eCreditor\u003c/label\u003e\n \u003cdiv class\u003d\"col-md-8\"\u003e\n \u003cinput cam-variable-name\u003d\"creditor\"\n cam-variable-type\u003d\"String\"\n id\u003d\"creditor\"\n class\u003d\"form-control\"\n type\u003d\"text\"\n required /\u003e\n \u003cdiv class\u003d\"help\"\u003e\n (e.g. \u0026quot;Great Pizza for Everyone Inc.\u0026quot;)\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n\n \u003c/form\u003e" + } + } + }, + "application/json": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/json` Responses, a byte stream is returned." + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The form key has wrong format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The deployed start form cannot be retrieved due to missing permissions on process definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No deployed start form for a given process definition exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/diagram": { + "get": { + "operationId": "getProcessDefinitionDiagram", + "tags": [ + "Process Definition" + ], + "summary": "Get Diagram", + "description": "Retrieves the diagram of a process definition.\n\nIf the process definition\u0027s deployment contains an image resource with the same file name\nas the process definition, the deployed image will be returned by the Get Diagram endpoint.\nExample: `someProcess.bpmn` and `someProcess.png`.\nSupported file extentions for the image are: `svg`, `png`, `jpg`, and `gif`.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + } + ], + "responses": { + "200": { + "description": "Request successful. The image diagram of this process.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "defaults to `application/octet-stream` if the file suffix is unknown" + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information image/png, image/gif, ... " + } + } + } + }, + "204": { + "description": "The process definition doesn\u0027t have an associated diagram." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/form-variables": { + "get": { + "operationId": "getStartFormVariables", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Variables", + "description": "Retrieves the start form variables for a process definition\n(only if they are defined via the \n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms) approach).\nThe start form variables take form data specified on the start event into account.\nIf form fields are defined, the variable types and default values\nof the form fields are taken into account.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to retrieve the variables for." + }, + { + "name": "variableNames", + "in": "query", + "schema": { + "type": "string" + }, + "description": "A comma-separated list of variable names. Allows restricting the list of requested\nvariables to the variable names in the list. It is best practice to restrict the\nlist of variables to the variables actually required by the form in order to\nminimize fetching of data. If the query parameter is ommitted all variables are\nfetched. If the query parameter contains non-existent variable names, the variable\nnames are ignored." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store\ncustom Java objects) should be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and\ntransformed to JSON using [Jackson\u0027s](http://jackson.codehaus.org/) POJO/bean\nproperty introspection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string\ncontaining XML.\n\n**Note**: While true is the default value for reasons of backward compatibility, we\nrecommend setting this parameter to false when developing web applications that are\nindependent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `/process-definition/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + } + } + } + } + }, + "description": "Request successful. A JSON object containing a property for each variable returned." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The id is null or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/history-time-to-live": { + "put": { + "operationId": "updateHistoryTimeToLiveByProcessDefinitionId", + "tags": [ + "Process Definition" + ], + "summary": "Update History Time to Live", + "description": "Updates history time to live for process definition.\nThe field is used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup).\nThe value of the update is mandatory by default and does not allow `null` values. To enable them, please\nset the feature flag `enforceHistoryTimeToLive` to `false`. Read more in [Configuration Properties]\n(https://docs.camunda.org/manual/7.22/reference/deployment-descriptors/tags/process-engine#configuration-properties)", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to change history time to live." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HistoryTimeToLiveDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/aProcessDefinitionId/history-time-to-live`", + "value": { + "historyTimeToLive": 5 + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the request parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/rendered-form": { + "get": { + "operationId": "getRenderedStartForm", + "tags": [ + "Process Definition" + ], + "summary": "Get Rendered Start Form", + "description": "Retrieves the rendered form for a process definition.\nThis method can be used to get the HTML rendering of a\n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to get the rendered start form for." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "A `/process-definition/anId/rendered-form` HTML\n GET response body providing the rendered (generated) form content.", + "value": "\u003cform class\u003d\"form-horizontal\"\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eCustomer ID\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"string\" name\u003d\"customerId\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eAmount\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"number\" name\u003d\"amount\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no form field metadata defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/restart": { + "post": { + "operationId": "restartProcessInstance", + "tags": [ + "Process Definition" + ], + "summary": "Restart Process Instance", + "description": "Restarts process instances that were canceled or terminated synchronously.\nCan also restart completed process instances.\nIt will create a new instance using the original instance information.\nTo execute the restart asynchronously, use the\n[Restart Process Instance Async](https://docs.camunda.org/manual/7.22/reference/rest/process-definition/post-restart-process-instance-async/) method.\n\nFor more information about the difference between synchronous and asynchronous execution,\nplease refer to the related section of the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-restart/#execution).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition of the process instances to restart." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestartProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Restarting one or more Process Instances with known processInstanceIds", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "initialVariables": true, + "skipCustomListeners": true, + "withoutBusinessKey": true + } + }, + "example-2": { + "summary": "Restarting one or more Process Instances using a historicProcessInstanceQuery", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "historicProcessInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId", + "processInstanceBusinessKey": "businessKey" + }, + "initialVariables": true, + "skipCustomListeners": true, + "withoutBusinessKey": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case following parameters are missing: `instructions`, `activityId` or `transitionId`,\n`processInstanceIds` or `historicProcessInstanceQuery`, an exception of type `InvalidRequestException` is returned. \nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/restart-async": { + "post": { + "operationId": "restartProcessInstanceAsyncOperation", + "tags": [ + "Process Definition" + ], + "summary": "Restart Process Instance Async", + "description": "Restarts process instances that were canceled or terminated asynchronously.\nCan also restart completed process instances.\nIt will create a new instance using the original instance information.\nTo execute the restart asynchronously, use the\n[Restart Process Instance](https://docs.camunda.org/manual/7.22/reference/rest/process-definition/post-restart-process-instance-sync/) method.\n\nFor more information about the difference between synchronous and asynchronous execution,\nplease refer to the related section of the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-restart/#execution).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition of the process instances to restart." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestartProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Restarting one or more Process Instances with known processInstanceIds", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "processInstanceIds": [ + "aProcessInstance", + "anotherProcessInstance" + ], + "initialVariables": true, + "skipCustomListeners": true, + "withoutBusinessKey": true + } + }, + "example-2": { + "summary": "Restarting one or more Process Instances using a historicProcessInstanceQuery", + "value": { + "instructions": [ + { + "type": "startAfterActivity", + "activityId": "aUserTask" + } + ], + "historicProcessInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId", + "processInstanceBusinessKey": "businessKey" + }, + "initialVariables": true, + "skipCustomListeners": true, + "withoutBusinessKey": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case following parameters are missing: `instructions`, `activityId` or `transitionId`,\n`processInstanceIds` or `historicProcessInstanceQuery`,\nan exception of type `InvalidRequestException` is returned. \nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/start": { + "post": { + "operationId": "startProcessInstance", + "tags": [ + "Process Definition" + ], + "summary": "Start Instance", + "description": "Instantiates a given process definition.\nProcess variables and business key may be supplied in the request body.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to be retrieved." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Starting a process instance at its default initial activity", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + }, + "example-2": { + "summary": "Starting a process instance with variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey", + "withVariablesInReturn": true + } + }, + "example-3": { + "summary": "Starting a process instance at two specific activities", + "value": { + "variables": { + "aProcessVariable": { + "value": "aStringValue", + "type": "String" + } + }, + "businessKey": "myBusinessKey", + "skipCustomListeners": true, + "startInstructions": [ + { + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String" + } + } + }, + { + "type": "startAfterActivity", + "activityId": "anotherActivityId", + "variables": { + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceWithVariablesDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "Response for starting a process instance at its default initial activity", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + }, + "example-2": { + "summary": "Status 200 Response 2", + "description": "Response for starting a process instance with variables in return", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/aProcInstId", + "rel": "self" + } + ], + "id": "aProcInstId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "ended": false, + "suspended": false, + "tenantId": null, + "variables": { + "anotherVariable": { + "type": "Boolean", + "value": true, + "valueInfo": { + "transient": true + } + }, + "aVariable": { + "type": "String", + "value": "aStringValue", + "valueInfo": {} + } + } + } + }, + "example-3": { + "summary": "Status 200 Response 3", + "description": "Response for starting a process instance at two specific activities", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/startForm": { + "get": { + "operationId": "getStartForm", + "tags": [ + "Process Definition" + ], + "summary": "Get Start Form Key", + "description": "Retrieves the key of the start form for a process definition.\nThe form key corresponds to the `FormData#formKey` property in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to get the start form key for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `process-definition/anId/startForm`", + "value": { + "key": "aFormKey", + "contextPath": "http://localhost:8080/my-process-application/" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition has no start form defined. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/static-called-process-definitions": { + "get": { + "operationId": "getStaticCalledProcessDefinitions", + "tags": [ + "Process Definition" + ], + "summary": "Get Static Called Process Definitions", + "description": "For the given process, returns a list of called process definitions corresponding\nto\nthe `CalledProcessDefinition` interface in the engine. The list\ncontains all process definitions\nthat are referenced statically by call activities in the given\nprocess. This endpoint does not\nresolve process definitions that are referenced with expressions. Each\ncalled process definition\ncontains a list of call activity ids, which specifies the call\nactivities that are calling that\nprocess. This endpoint does not resolve references to case\ndefinitions.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalledProcessDefinitionDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/process-definition/aProcessDefinitionId/static-called-process-definitions`", + "description": "GET `/process-definition/aProcessDefinitionId/static-called-process-definitions`", + "value": [ + { + "id": "ACalledProcess:1:1bbd4e83-f8f1-11eb-9344", + "key": "ACalledProcess", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "ACalledProcess", + "version": 1, + "resource": "called-process.bpmn", + "deploymentId": "1baa3baf-f8f1-11eb-9344-0e0bbdd53e42", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "calledFromActivityIds": [ + "aCallActivityId" + ], + "callingProcessDefinitionId": "aProcessDefinitionId", + "startableInTasklist": true + }, + { + "id": "AnotherCalledProcess:2:1bc2f3d5-f8f1-11eb-9344", + "key": "AnotherCalledProcess", + "category": "http://www.omg.org/spec/BPMN/20100524/MODEL", + "description": null, + "name": "AnotherCalledProcess", + "version": 2, + "resource": "another-called-process.bpmn", + "deploymentId": "1baa3baf-f8f1-11eb-9344-0e0bbdd53e42", + "diagram": null, + "suspended": false, + "tenantId": null, + "versionTag": null, + "historyTimeToLive": null, + "calledFromActivityIds": [ + "aSecondCallActivityId", + "aThirdCallActivityId" + ], + "callingProcessDefinitionId": "aProcessDefinitionId", + "startableInTasklist": true + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/statistics": { + "get": { + "operationId": "getActivityStatistics", + "tags": [ + "Process Definition" + ], + "summary": "Get Activity Instance Statistics", + "description": "Retrieves runtime statistics of a given process definition, grouped by activities.\nThese statistics include the number of running activity instances, optionally the number of failed jobs\nand also optionally the number of incidents either grouped by incident types or for a specific incident type.\n**Note**: This does not include historic data.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + }, + { + "name": "failedJobs", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Whether to include the number of failed jobs in the result or not. Valid values are `true` or `false`." + }, + { + "name": "incidents", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Valid values for this property are `true` or `false`.\nIf this property has been set to `true` the result will include the corresponding number of incidents\nfor each occurred incident type.\nIf it is set to `false`, the incidents will not be included in the result.\nCannot be used in combination with `incidentsForType`." + }, + { + "name": "incidentsForType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "If this property has been set with any incident type (i.e., a string value) the result\nwill only include the number of incidents for the assigned incident type.\nCannot be used in combination with `incidents`.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityStatisticsResultDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /process-definition/aProcessDefinitionId/statistics?failedJobs\u003dtrue", + "description": "Request with Query Parameter `failedJobs\u003dtrue`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anActivity", + "instances": 123, + "failedJobs": 42, + "incidents": [] + }, + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anotherActivity", + "instances": 124, + "failedJobs": 43, + "incidents": [] + } + ] + }, + "example-2": { + "summary": "GET /process-definition/aProcessDefinitionId/statistics?incidents\u003dtrue", + "description": "Request with Query Parameter `incidents\u003dtrue`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 42 + }, + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + }, + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anotherActivity", + "instances": 124, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "failedJob", + "incidentCount": 43 + }, + { + "incidentType": "anIncident", + "incidentCount": 22 + }, + { + "incidentType": "anotherIncident", + "incidentCount": 15 + } + ] + } + ] + }, + "example-3": { + "summary": "GET /process-definition/aProcessDefinitionId/statistics?incidentsForType\u003danIncident", + "description": "Request with Query Parameter `incidentsForType\u003danIncident`", + "value": [ + { + "@class": "org.camunda.bpm.engine.rest.dto.repository.ActivityStatisticsResultDto", + "id": "anActivity", + "instances": 123, + "failedJobs": 0, + "incidents": [ + { + "incidentType": "anIncident", + "incidentCount": 20 + } + ] + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/submit-form": { + "post": { + "operationId": "submitForm", + "tags": [ + "Process Definition" + ], + "summary": "Submit Start Form", + "description": "Starts a process instance using a set of process variables and the business key.\nIf the start event has Form Field Metadata defined, the process engine will perform backend validation\nfor any form fields which have validators defined.\nSee [Documentation on Generated Task Forms](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to submit the form for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartProcessInstanceFormDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-definition/aProcessDefinitionId/submit-form`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + }, + "businessKey": "myBusinessKey" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "description": "POST `/process-definition/aProcessDefinitionId/submit-form`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/rest-test/process-instance/anId", + "rel": "self" + } + ], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "myBusinessKey", + "caseInstanceId": null, + "tenantId": null, + "ended": false, + "suspended": false + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created due to an invalid variable value,\nfor example if the value could not be parsed to an `Integer` value or\nthe passed variable type is not supported.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The instance could not be created successfully.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/suspended": { + "put": { + "operationId": "updateProcessDefinitionSuspensionStateById", + "tags": [ + "Process Definition" + ], + "summary": "Activate/Suspend By Id", + "description": "Activates or suspends a given process definition by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition to activate or suspend." + } + ], + "requestBody": { + "description": "**Note**: Unallowed properties are `processDefinitionId` and `processDefinitionKey`.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-definition/aProcessDefinitionId/suspended`", + "value": { + "suspended": true, + "includeProcessInstances": true, + "executionDate": "2013-11-21T10:49:45T14:42:45" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid,\nfor example if the provided `executionDate` parameter doesn\u0027t have the expected format or\nif the `processDefinitionKey` parameter is `null`. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given key does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-definition/{id}/xml": { + "get": { + "operationId": "getProcessDefinitionBpmn20Xml", + "tags": [ + "Process Definition" + ], + "summary": "Get XML", + "description": "Retrieves the BPMN 2.0 XML of a process definition.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessDefinitionDiagramDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-definition/id/aProcessDefinitionId/xml`", + "value": { + "id": "anProcessDefinitionId", + "bpmn20Xml": "\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e\n\u003cdefinitions\n xmlns\u003d\"http://www.omg.org/spec/BPMN/20100524/MODEL\"\n xmlns:camunda\u003d\"http://camunda.org/schema/1.0/bpmn\"\n targetNamespace\u003d\"Examples\"\u003e\n \u003cprocess id\u003d\"oneTaskProcess\" isExecutable\u003d\"true\"\u003e\n \u003cstartEvent id\u003d\"theStart\" /\u003e\n \u003csequenceFlow id\u003d\"flow1\" sourceRef\u003d\"theStart\" targetRef\u003d\"theEnd\" /\u003e\n \u003cendEvent id\u003d\"theEnd\" /\u003e\n \u003c/process\u003e\n \u003c/definitions\u003e" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The Process Definition xml cannot be retrieved due to missing permissions on the Process Definition resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process definition with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-instance": { + "get": { + "operationId": "getProcessInstances", + "tags": [ + "Process Instance" + ], + "summary": "Get List", + "description": "Queries for process instances that fulfill given parameters.\nParameters may be static as well as dynamic runtime properties of process instances.\nThe size of the result set can be retrieved by using the Get Instance Count method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "instanceId", + "definitionKey", + "definitionId", + "tenantId", + "businessKey" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process instance ids." + }, + { + "name": "businessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "businessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances run on." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition keys.\nA process instance must have one of the given process definition keys." + }, + { + "name": "processDefinitionKeyNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Exclude instances by a comma-separated list of process definition keys.\nA process instance must not have one of the given process definition keys." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "superProcessInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given process instance.\nTakes a process instance id." + }, + { + "name": "subProcessInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that have the given process instance as a sub process instance.\nTakes a process instance id." + }, + { + "name": "superCaseInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance.\nTakes a case instance id." + }, + { + "name": "subCaseInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that have the given case instance as a sub case instance.\nTakes a case instance id." + }, + { + "name": "active", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include active process instances. Value may only be true,\nas false is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include suspended process instances. Value may only be true,\nas false is the default behavior." + }, + { + "name": "withIncident", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Filter by presence of incidents. Selects only process instances that have an incident." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A process instance must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include process instances which belong to no tenant." + }, + { + "name": "processDefinitionWithoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include process instances which process definition has no tenant id." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of activity ids.\nA process instance must currently wait in a leaf activity with one of the given activity ids." + }, + { + "name": "rootProcessInstances", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are top level process instances." + }, + { + "name": "leafProcessInstances", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are leaf instances. (i.e. don\u0027t have any sub instances)." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that have variables with certain values.\nVariable filtering expressions are comma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable names in this query case-insensitively.\nIf set to true variableName and variablename are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable values in this query case-insensitively.\nIf set to true variableValue and variablevalue are treated as equal." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/process-instance?variables\u003dmyVariable_eq_camunda,mySecondVariable_neq_aBadValue`", + "value": [ + { + "links": [], + "id": "anId", + "definitionId": "aProcDefId", + "businessKey": "aKey", + "caseInstanceId": "aCaseInstanceId", + "ended": false, + "suspended": false, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid,\nfor example if a sortOrder parameter is supplied, but no sortBy, or if an invalid operator for variable comparison is used." + } + } + }, + "post": { + "operationId": "queryProcessInstances", + "tags": [ + "Process Instance" + ], + "summary": "Get List (POST)", + "description": "Queries for process instances that fulfill given parameters through a JSON object.\nThis method is slightly more powerful than the Get Instances method because\nit allows filtering by multiple process variables of types `string`, `number` or `boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance` Request Body 1", + "value": { + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId", + "sorting": [ + { + "sortBy": "definitionKey", + "sortOrder": "asc" + }, + { + "sortBy": "instanceId", + "sortOrder": "desc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProcessInstanceDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": [ + { + "links": [], + "id": "anId", + "definitionId": "aProcessDefinitionId", + "businessKey": "aKey", + "caseInstanceId": "aCaseInstanceId", + "ended": false, + "suspended": false, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid,\nfor example if a sortOrder parameter is supplied, but no sortBy, or if an invalid operator for variable comparison is used." + } + } + } + }, + "/process-instance/count": { + "get": { + "operationId": "getProcessInstancesCount", + "tags": [ + "Process Instance" + ], + "summary": "Get List Count", + "description": "Queries for the number of process instances that fulfill given parameters.", + "parameters": [ + { + "name": "processInstanceIds", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process instance ids." + }, + { + "name": "businessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key." + }, + { + "name": "businessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by case instance id." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the key of the process definition the instances run on." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process definition keys.\nA process instance must have one of the given process definition keys." + }, + { + "name": "processDefinitionKeyNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Exclude instances by a comma-separated list of process definition keys.\nA process instance must not have one of the given process definition keys." + }, + { + "name": "deploymentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the deployment the id belongs to." + }, + { + "name": "superProcessInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given process instance.\nTakes a process instance id." + }, + { + "name": "subProcessInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that have the given process instance as a sub process instance.\nTakes a process instance id." + }, + { + "name": "superCaseInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that are sub process instances of the given case instance.\nTakes a case instance id." + }, + { + "name": "subCaseInstance", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all process instances that have the given case instance as a sub case instance.\nTakes a case instance id." + }, + { + "name": "active", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include active process instances. Value may only be true,\nas false is the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include suspended process instances. Value may only be true,\nas false is the default behavior." + }, + { + "name": "withIncident", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Filter by presence of incidents. Selects only process instances that have an incident." + }, + { + "name": "incidentId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident id." + }, + { + "name": "incidentType", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident type.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types)\nfor a list of incident types." + }, + { + "name": "incidentMessage", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message. Exact match." + }, + { + "name": "incidentMessageLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the incident message that the parameter is a substring of." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A process instance must have one of the given tenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include process instances which belong to no tenant." + }, + { + "name": "processDefinitionWithoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include process instances which process definition has no tenant id." + }, + { + "name": "activityIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of activity ids.\nA process instance must currently wait in a leaf activity with one of the given activity ids." + }, + { + "name": "rootProcessInstances", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are top level process instances." + }, + { + "name": "leafProcessInstances", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Restrict the query to all process instances that are leaf instances. (i.e. don\u0027t have any sub instances)." + }, + { + "name": "variables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include process instances that have variables with certain values.\nVariable filtering expressions are comma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable names in this query case-insensitively.\nIf set to true variableName and variablename are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable values in this query case-insensitively.\nIf set to true variableValue and variablevalue are treated as equal." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "description": "Response for GET `/process-instance/count?variables\u003dmyVariable_eq_camunda`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example an invalid operator for variable comparison is used." + } + } + }, + "post": { + "operationId": "queryProcessInstancesCount", + "tags": [ + "Process Instance" + ], + "summary": "Get List Count (POST)", + "description": "Queries for the number of process instances that fulfill the given parameters.\nThis method takes the same message body as the Get Instances (POST) method and\ntherefore it is slightly more powerful than the Get Instance Count method.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/count` Request Body 1", + "value": { + "variables": [ + { + "name": "myVariable", + "operator": "eq", + "value": "camunda" + }, + { + "name": "mySecondVariable", + "operator": "neq", + "value": 124 + } + ], + "processDefinitionId": "aProcessDefinitionId" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if an invalid operator for variable comparison is used." + } + } + } + }, + "/process-instance/delete": { + "post": { + "operationId": "deleteProcessInstancesAsyncOperation", + "tags": [ + "Process Instance" + ], + "summary": "Delete Async (POST)", + "description": "Deletes multiple process instances asynchronously (batch).", + "requestBody": { + "description": "**Unallowed property**: `historicProcessInstanceQuery`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteProcessInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/delete` Request Body 1", + "value": { + "deleteReason": "aReason", + "processInstanceIds": [ + "aProcess", + "secondProcess" + ], + "skipCustomListeners": true, + "skipSubprocesses": true, + "skipIoMappings": false + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, i.e., neither processInstanceIds, nor processInstanceQuery is present" + } + } + } + }, + "/process-instance/delete-historic-query-based": { + "post": { + "operationId": "deleteAsyncHistoricQueryBased", + "tags": [ + "Process Instance" + ], + "summary": "Delete Async Historic Query Based (POST)", + "description": "Deletes a set of process instances asynchronously (batch) based on a historic process instance query.", + "requestBody": { + "description": "**Unallowed property**: `processInstanceQuery`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteProcessInstancesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/delete-historic-query-based` Request Body 1", + "value": { + "deleteReason": "aReason", + "historicProcessInstanceQuery": { + "startedBefore": "2017-04-28T11:24:37.765+0200" + }, + "skipCustomListeners": true, + "skipSubprocesses": true, + "skipIoMappings": false + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response 1", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, i.e., neither processInstanceIds, nor historicProcessInstanceQuery is present" + } + } + } + }, + "/process-instance/job-retries": { + "post": { + "operationId": "setRetriesByProcess", + "tags": [ + "Process Instance" + ], + "summary": "Set Job Retries Async (POST)", + "description": "Create a batch to set retries of jobs associated with given processes asynchronously.", + "requestBody": { + "description": "Please note that if both processInstances and processInstanceQuery are provided,\nthen the resulting execution will be performed on the union of these sets.\n**Unallowed property**: `historicProcessInstanceQuery`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetJobRetriesByProcessDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/job-retries` Request Body 1", + "value": { + "retries": 5, + "dueDate": "2017-04-06T13:57:45.000+0200", + "processInstances": [ + "aProcess", + "secondProcess" + ], + "processInstanceQuery": { + "processDefinitionId": "aProcessDefinitionId" + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "batchJobsPerSeed": 100, + "jobsCreated": 10, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "suspended": false, + "tenantId": "aTenantId", + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if neither processInstanceIds, nor processInstanceQuery is present.\nOr if the retry count is not specified." + } + } + } + }, + "/process-instance/job-retries-historic-query-based": { + "post": { + "operationId": "setRetriesByProcessHistoricQueryBased", + "tags": [ + "Process Instance" + ], + "summary": "Set Job Retries Async Historic Query Based (POST)", + "description": "Create a batch to set retries of jobs asynchronously based on a historic process instance query.", + "requestBody": { + "description": "Please note that if both processInstances and historicProcessInstanceQuery are provided,\nthen the resulting execution will be performed on the union of these sets.\n**Unallowed property**: `processInstanceQuery`", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetJobRetriesByProcessDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/job-retries-historic-query-based` Request Body 1", + "value": { + "retries": 5, + "dueDate": "2017-04-06T13:57:45.000+0200", + "historicProcessInstanceQuery": { + "startedBefore": "2017-04-28T11:24:37.769+0200" + }, + "processInstances": [ + "aProcess", + "secondProcess" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the query parameters are invalid, for example if neither processInstanceIds, nor historicProcessInstanceQuery is present.\nOr if the retry count is not specified." + } + } + } + }, + "/process-instance/message-async": { + "post": { + "operationId": "correlateMessageAsyncOperation", + "tags": [ + "Process Instance" + ], + "summary": "Correlate Message Async (POST)", + "description": "Correlates a message asynchronously to executions that are waiting for this message. \nMessages will not be correlated to process definition-level start message events to start process instances.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CorrelationMessageAsyncDto" + }, + "examples": { + "example-1": { + "summary": "POST /process-instance/message-async", + "description": "Correlate a message to process instances in a batch", + "value": { + "messageName": "a-message-name", + "processInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7" + ], + "processInstanceQuery": { + "processDefinitionKey": "my-process-definition-key" + }, + "variables": { + "myVariableName": { + "value": "myStringValue" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "correlate-message", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\n* If none of `processInstanceIds`, `processInstanceQuery`, and `historicProcessInstanceQuery` is given\n* If no process instance ids where found" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Returned if the user is not allowed to create the batch.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/process-instance/suspended": { + "put": { + "operationId": "updateSuspensionState", + "tags": [ + "Process Instance" + ], + "summary": "Activate/Suspend In Group", + "description": "Activates or suspends process instances by providing certain criteria:\n\n# Activate/Suspend Process Instance By Process Definition Id\n* `suspend`\n* `processDefinitionId`\n\n# Activate/Suspend Process Instance By Process Definition Key\n\n* `suspend`\n* `processDefinitionKey`\n* `processDefinitionTenantId`\n* `processDefinitionWithoutTenantId`\n\n# Activate/Suspend Process Instance In Group\n* `suspend`\n* `processInstanceIds`\n* `processInstanceQuery`\n* `historicProcessInstanceQuery`", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceSuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-instance/suspended`", + "description": "Suspend Process Instance By Process Definition Id", + "value": { + "processDefinitionId": "aProcDefId", + "suspended": true + } + }, + "example-2": { + "summary": "PUT `/process-instance/suspended`", + "description": "Suspend Process Instance By Process Definition Key", + "value": { + "processDefinitionKey": "aProcDefKey", + "suspended": true + } + }, + "example-3": { + "summary": "PUT `/process-instance/suspended`", + "description": "Suspend Process Instance In Group", + "value": { + "processInstanceIds": [ + "processInstanceId1", + "processInstanceIdN" + ], + "suspended": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the request parameters are invalid,\nfor example if the provided processDefinitionId or processDefinitionKey parameter is null." + } + } + } + }, + "/process-instance/suspended-async": { + "post": { + "operationId": "updateSuspensionStateAsyncOperation", + "tags": [ + "Process Instance" + ], + "summary": "Activate/Suspend In Batch", + "description": "Activates or suspends process instances asynchronously with a list of process instance ids,\na process instance query, and/or a historical process instance query.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceSuspensionStateAsyncDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/suspended-async`", + "description": "Suspend Process Instance In Batch", + "value": { + "processInstanceIds": [ + "processInstanceId1", + "processInstanceIdN" + ], + "suspended": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nReturned if some of the request parameters are invalid,\nfor example if the provided processDefinitionId or processDefinitionKey parameter is null." + } + } + } + }, + "/process-instance/variables-async": { + "post": { + "operationId": "setVariablesAsyncOperation", + "tags": [ + "Process Instance" + ], + "summary": "Set Variables Async (POST)", + "description": "Update or create runtime process variables in the root scope of process instances.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetVariablesAsyncDto" + }, + "examples": { + "example-1": { + "summary": "POST /process-instance/variables-async", + "description": "Set variables to process instances in a batch", + "value": { + "processInstanceIds": [ + "b4d2ad98-7240-11e9-98b7-be5e0f7575b7" + ], + "processInstanceQuery": { + "processDefinitionKey": "my-process-definition-key" + }, + "variables": { + "myVariableName": { + "value": "myStringValue" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "120b568d-724a-11e9-98b7-be5e0f7575b7", + "type": "set-variables", + "totalJobs": 12, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7", + "monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7", + "batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7", + "tenantId": "accounting", + "suspended": false, + "createUserId": null + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\n* The variable value or type is invalid, for example if the value could not be parsed to an Integer value or\nthe passed variable type is not supported\n* If none of `processInstanceIds`, `processInstanceQuery` and `historicProcessInstanceQuery` is given\n* If no or an empty array of `variables` is given\n* If no process instance ids where found\n* If a transient variable is set\n* If the engine config flag `javaSerializationFormatEnabled` is `false` and a Java serialized variable is given" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Returned if the user is not allowed to create the batch.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/process-instance/{id}": { + "delete": { + "operationId": "deleteProcessInstance", + "tags": [ + "Process Instance" + ], + "summary": "Delete", + "description": "Deletes a running process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to be deleted." + }, + { + "name": "skipCustomListeners", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to true, the custom listeners will be skipped." + }, + { + "name": "skipIoMappings", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to true, the input/output mappings will be skipped." + }, + { + "name": "skipSubprocesses", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to true, subprocesses related to deleted processes will be skipped." + }, + { + "name": "failIfNotExists", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "If set to false, the request will still be successful if the process id is not found." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not found\nProcess instance with given id does not exist. " + } + } + }, + "get": { + "operationId": "getProcessInstance", + "tags": [ + "Process Instance" + ], + "summary": "Get Process Instance", + "description": "Retrieves a process instance by id, according to the `ProcessInstance` interface in the engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-instance/aProcessInstanceId`", + "value": { + "id": "aProcessInstanceId", + "definitionId": "aProcDefId", + "businessKey": "aKey", + "caseInstanceId": "aCaseInstanceId", + "ended": false, + "suspended": false, + "tenantId": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process instance with given id does not exist. See the \n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format. " + } + } + } + }, + "/process-instance/{id}/activity-instances": { + "get": { + "operationId": "getActivityInstanceTree", + "tags": [ + "Process Instance" + ], + "summary": "Get Activity Instance", + "description": "Retrieves an Activity Instance (Tree) for a given process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance for which the activity instance should be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityInstanceDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-instance/aProcessInstanceId/activity-instances`", + "value": { + "id": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "parentActivityInstanceId": null, + "activityId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6", + "activityType": "processDefinition", + "processInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "processDefinitionId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6", + "childActivityInstances": [ + { + "id": "approveInvoice:eca89509-f70c-11e9-8777-e4a7a094a9d6", + "parentActivityInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "activityId": "approveInvoice", + "activityType": "userTask", + "processInstanceId": "eca75c6b-f70c-11e9-8777-e4a7a094a9d6", + "processDefinitionId": "invoice:2:e9d77375-f70c-11e9-8777-e4a7a094a9d6", + "childActivityInstances": [], + "childTransitionInstances": [], + "executionIds": [ + "eca75c6b-f70c-11e9-8777-e4a7a094a9d6" + ], + "activityName": "Approve Invoice", + "incidentIds": [ + "648d7e21-f71c-11e9-a725-e4a7a094a9d6" + ], + "incidents": [ + { + "id": "648d7e21-f71c-11e9-a725-e4a7a094a9d6", + "activityId": "AttachedTimerBoundaryEvent" + } + ], + "name": "Approve Invoice" + } + ], + "childTransitionInstances": [], + "executionIds": [ + "eca75c6b-f70c-11e9-8777-e4a7a094a9d6" + ], + "activityName": "Invoice Receipt", + "incidentIds": null, + "incidents": null, + "name": "Invoice Receipt" + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process instance with given id does not exist." + } + } + } + }, + "/process-instance/{id}/comment": { + "get": { + "operationId": "getProcessInstanceComments", + "tags": [ + "Process Instance" + ], + "summary": "Get Process Instance Comments", + "description": "Gets the comments for a process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to retrieve the comments for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /process-instance/aProcessInstanceId/comment", + "value": [ + { + "id": "commentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "aProcessInstanceId", + "time": "2013-01-02T21:37:03.764+0200", + "message": "message", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "anotherCommentId", + "userId": "anotherUserId", + "taskId": "aTaskId", + "processInstanceId": "aProcessInstanceId", + "time": "2013-02-23T20:37:43.975+0200", + "message": "anotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "yetAnotherCommentId", + "userId": "yetAnotherUserId", + "taskId": "aTaskId", + "processInstanceId": "aProcessInstanceId", + "time": "2013-04-21T10:15:23.764+0200", + "message": "yetAnotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No process instance exists for the given process instance id. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/process-instance/{id}/modification": { + "post": { + "operationId": "modifyProcessInstance", + "tags": [ + "Process Instance" + ], + "summary": "Modify Process Instance Execution State", + "description": "Submits a list of modification instructions to change a process instance\u0027s execution state.\nA modification instruction is one of the following:\n\n* Starting execution before an activity\n* Starting execution after an activity on its single outgoing sequence flow\n* Starting execution on a specific sequence flow\n* Canceling an activity instance, transition instance, or all instances (activity or transition) for an activity\n\nInstructions are executed immediately and in the order they are provided in this request\u0027s body.\nVariables can be provided with every starting instruction.\n\nThe exact semantics of modification can be read about in the [User guide](https://docs.camunda.org/manual/develop/user-guide/process-engine/process-instance-modification/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to modify." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceModificationDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/modification`", + "value": { + "skipCustomListeners": true, + "skipIoMappings": true, + "instructions": [ + { + "type": "startBeforeActivity", + "activityId": "activityId", + "variables": { + "var": { + "value": "aVariableValue", + "local": false, + "type": "String" + }, + "varLocal": { + "value": "anotherVariableValue", + "local": true, + "type": "String" + } + } + }, + { + "type": "cancel", + "activityInstanceId": "anActivityInstanceId" + } + ], + "annotation": "Modified to resolve an error." + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "At least one modification instruction misses required parameters." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The modification cannot be performed, for example because it starts a failing activity." + } + } + } + }, + "/process-instance/{id}/modification-async": { + "post": { + "operationId": "modifyProcessInstanceAsyncOperation", + "tags": [ + "Process Instance" + ], + "summary": "Modify Process Instance Execution State Async", + "description": "Submits a list of modification instructions to change a process instance\u0027s execution state async.\nA modification instruction is one of the following:\n\n* Starting execution before an activity\n* Starting execution after an activity on its single outgoing sequence flow\n* Starting execution on a specific sequence flow\n* Cancelling an activity instance, transition instance, or all instances (activity or transition) for an activity\n\nInstructions are executed asynchronous and in the order they are provided in this request\u0027s body.\nVariables can be provided with every starting instruction.\n\nThe exact semantics of modification can be read about in the\n[User guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-instance-modification/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to modify." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProcessInstanceModificationDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/modification-async`", + "value": { + "skipCustomListeners": true, + "skipIoMappings": true, + "instructions": [ + { + "type": "startBeforeActivity", + "activityId": "activityId" + }, + { + "type": "cancel", + "activityInstanceId": "anActivityInstanceId" + } + ], + "annotation": "Modified to resolve an error." + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "aBatchId", + "type": "aBatchType", + "totalJobs": 10, + "jobsCreated": 10, + "batchJobsPerSeed": 100, + "invocationsPerBatchJob": 1, + "seedJobDefinitionId": "aSeedJobDefinitionId", + "monitorJobDefinitionId": "aMonitorJobDefinitionId", + "batchJobDefinitionId": "aBatchJobDefinitionId", + "tenantId": "aTenantId", + "suspended": false, + "createUserId": "demo" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nAt least one modification instruction misses required parameters." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Forbidden\nIf the user is not allowed to execute batches. See the Introduction for the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The modification cannot be performed, for example because it starts a failing activity." + } + } + } + }, + "/process-instance/{id}/suspended": { + "put": { + "operationId": "updateSuspensionStateById", + "tags": [ + "Process Instance" + ], + "summary": "Activate/Suspend Process Instance By Id", + "description": "Activates or suspends a given process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to activate or suspend." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuspensionStateDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/process-instance/aProcessInstanceId/suspended`", + "value": { + "suspended": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + } + } + } + }, + "/process-instance/{id}/variables": { + "get": { + "operationId": "getProcessInstanceVariables", + "tags": [ + "Process Instance" + ], + "summary": "Get Process Variables", + "description": "Retrieves all variables of a given process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to retrieve the variables from." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\nNote: While true is the default value for reasons of backward compatibility, we recommend setting this parameter to false\nwhen developing web applications that are independent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/process-instance/aProcessInstanceId/variables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }, + "example-2": { + "summary": "GET `/process-instance/aProcessInstanceId/variables?deserializeValue\u003dfalse`", + "value": { + "aVariableKey": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Process instance with given id does not exist." + } + } + }, + "post": { + "operationId": "modifyProcessInstanceVariables", + "tags": [ + "Process Instance" + ], + "summary": "Update/Delete Process Variables", + "description": "Updates or deletes the variables of a process instance by id. Updates precede deletions.\nSo, if a variable is updated AND deleted, the deletion overrides the update.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to set variables for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchVariablesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/variables`", + "description": "Status 204 Response: No content.", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nThe variable value or type is invalid, for example if the value could not be parsed to an Integer value or\nthe passed variable type is not supported." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Update or delete could not be executed, for example because the process instance does not exist." + } + } + } + }, + "/process-instance/{id}/variables/{varName}": { + "delete": { + "operationId": "deleteProcessInstanceVariable", + "tags": [ + "Process Instance" + ], + "summary": "Delete Process Variable", + "description": "Deletes a variable of a process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to delete the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to delete." + } + ], + "responses": { + "204": { + "description": "Request successful." + } + } + }, + "get": { + "operationId": "getProcessInstanceVariable", + "tags": [ + "Process Instance" + ], + "summary": "Get Process Variable", + "description": "Retrieves a variable of a given process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\nNote: While true is the default value for reasons of backward compatibility, we recommend setting this parameter to false\nwhen developing web applications that are independent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "GET `/process-instance/aProcessInstanceId/variables/myObject123`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }, + "example-2": { + "summary": "GET `/process-instance/aProcessInstanceId/variables/myObject123?deserializeValue\u003dfalse`", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nVariable with given id does not exist." + } + } + }, + "put": { + "operationId": "setProcessInstanceVariable", + "tags": [ + "Process Instance" + ], + "summary": "Update Process Variable", + "description": "Sets a variable of a given process instance by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to set the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to set." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "PUT /process-instance/aProcessInstanceId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "someValue", + "type": "String" + } + }, + "example-2": { + "summary": "PUT /process-instance/aProcessInstanceId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nThe variable value or type is invalid, for example if the value could not be parsed to an Integer value or\nthe passed variable type is not supported." + } + } + } + }, + "/process-instance/{id}/variables/{varName}/data": { + "get": { + "operationId": "getProcessInstanceVariableBinary", + "tags": [ + "Process Instance" + ], + "summary": "Get Process Variable (Binary)", + "description": "Retrieves the content of a Process Variable by the Process Instance id and the Process Variable name.\nApplicable for byte array or file Process Variables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "responses": { + "200": { + "description": "Request successful.\n For binary variables or files without any MIME type information, a byte stream is returned.\n File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "binary variable: Status 200", + "value": "Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "file variable: Status 200", + "value": "Content-Type: text/plain; charset\u003dUTF-8. Content-Disposition: attachment; filename\u003d\"someFile.txt\"" + } + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nA Process Variable with the given id exists but does not serialize as binary data." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Not Found\nA Process Variable with the given id does not exist. " + } + } + }, + "post": { + "operationId": "setProcessInstanceVariableBinary", + "tags": [ + "Process Instance" + ], + "summary": "Update Process Variable (Binary)", + "description": "Sets the serialized value for a binary variable or the binary value for a file variable.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the process instance to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "requestBody": { + "description": "For binary variables a multipart form submit with the following parts:", + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormVariableBinaryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/process-instance/aProcessInstanceId/variables/aVarName/data` (1)", + "description": "Post binary content of a byte array variable.", + "value": "\n ```\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"image.png\"\n Content-Type: application/octet-stream\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n Bytes\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-2": { + "summary": "POST `/process-instance/aProcessInstanceId/variables/aVarName/data` (2)", + "description": "Post the JSON serialization of a Java Class (**deprecated**).", + "value": "\n ```\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"type\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n java.util.ArrayList\u003cjava.lang.Object\u003e\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"data\"\n Content-Type: application/json; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n [\"foo\",\"bar\"]\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-3": { + "summary": "POST `/process-instance/aProcessInstanceId/variables/aVarName/data` (3)", + "description": "Post a text file.", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"myFile.txt\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n File\n ------------------------------1e838f8f632a--\n ```\n " + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request\nThe variable value or type is invalid, for example if no filename is set." + } + } + } + }, + "/schema/log": { + "get": { + "operationId": "getSchemaLog", + "tags": [ + "Schema Log" + ], + "summary": "Get List", + "description": "Queries for schema log entries that fulfill given parameters.", + "parameters": [ + { + "name": "version", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only return schema log entries with a specific version." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "timestamp" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchemaLogEntryDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [ + { + "id": "0", + "version": "7.11.0", + "timestamp": "2019-05-13T09:07:11.751+0200" + }, + { + "id": "1", + "version": "7.11.1", + "timestamp": "2019-06-1T17:22:05.123+0200" + } + ] + } + } + } + }, + "description": "Request successful.\n**Note**: In order to get any results a user of group `camunda-admin` must\nbe authenticated." + } + } + }, + "post": { + "operationId": "querySchemaLog", + "tags": [ + "Schema Log" + ], + "summary": "Get List (POST)", + "description": "Queries for schema log entries that fulfill given parameters.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchemaLogQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST /schema/log", + "description": "The content of the Request Body", + "value": { + "version": "7.11.0", + "sortBy": "timestamp", + "sortOrder": "asc" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchemaLogEntryDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": [ + { + "id": "0", + "version": "7.11.0", + "timestamp": "2019-05-13T09:07:11.751+0200" + } + ] + } + } + } + }, + "description": "Request successful.\n**Note**: In order to get any results a user of group camunda-admin must be\nauthenticated." + } + } + } + }, + "/signal": { + "post": { + "operationId": "throwSignal", + "tags": [ + "Signal" + ], + "summary": "Event", + "description": "A signal is an event of global scope (broadcast semantics) and is delivered to all\nactive handlers. Internally this maps to the engine\u0027s signal event received builder\nmethod `RuntimeService#createSignalEvent()`. For more information about the signal\nbehavior, see the [Signal Events](https://docs.camunda.org/manual/7.22/reference/bpmn20/events/signal-events/)\nsection of the [BPMN 2.0 Implementation Reference](https://docs.camunda.org/manual/7.22/reference/bpmn20/).", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignalDto" + }, + "examples": { + "examle-1": { + "summary": "POST /signal", + "description": "The content of the Request Body", + "value": { + "name": "policy_conditions_changed", + "variables": { + "newTimePeriodInMonth": { + "value": 24 + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if:\n\n* no name was given\n* the variable value or type is invalid, for example if the value could not be\nparsed to an integer value or the passed variable type is not supported\n* a tenant id and an execution id is specified.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "Returned if the user is not allowed to throw a signal event.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if a single execution is specified and no such execution exists or has not\nsubscribed to the signal.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the\nerror response format." + } + } + } + }, + "/task": { + "get": { + "operationId": "getTasks", + "tags": [ + "Task" + ], + "summary": "Get List", + "description": "Queries for tasks that fulfill a given filter. The size of the result set can be\nretrieved by using the Get Task Count method.\n\n**Security Consideration:** There are several query parameters (such as\nassigneeExpression) for specifying an EL expression. These are disabled by default to\nprevent remote code execution. See the section on\n[security considerations](https://docs.camunda.org/manual/7.22/user-guide/process-engine/securing-custom-code/)\nfor custom code in the user guide for details.", + "parameters": [ + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to task with the given id." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with any of the given ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given id." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given ids." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given business key." + }, + { + "name": "processInstanceBusinessKeyExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given business key which \nis described by an expression. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with one of the give business keys. \nThe keys need to be in a comma-separated list." + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring." + }, + { + "name": "processInstanceBusinessKeyLikeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring and is described by an expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with one of the given keys. The \nkeys need to be in a comma-separated list." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + { + "name": "processDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process definition name that has the parameter value as \na substring." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to an execution with the given id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to case instances with the given id." + }, + { + "name": "caseInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to case instances with the given business key." + }, + { + "name": "caseInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a case instance business key that has the parameter value \nas a substring." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given id." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + { + "name": "caseDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + { + "name": "caseDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a case definition name that has the parameter value as a \nsubstring." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case execution with the given id." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated activity \ninstance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated \ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which belong to no tenant. Value may only be `true`, \nas `false` is the default behavior." + }, + { + "name": "assignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user is assigned to." + }, + { + "name": "assigneeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the user described by the given expression is assigned to. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "assigneeLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have an assignee that has the parameter \nvalue as a substring." + }, + { + "name": "assigneeLikeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have an assignee that has the parameter value described by the \ngiven expression as a substring. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "assigneeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which are assigned to one of the passed and \ncomma-separated user ids." + }, + { + "name": "assigneeNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which are not assigned to one of the passed and\ncomma-separated user ids." + }, + { + "name": "owner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user owns." + }, + { + "name": "ownerExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the user described by the given expression owns. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "candidateGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the given group." + }, + { + "name": "candidateGroupLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to groups that have the parameter value as a substring." + }, + { + "name": "candidateGroupExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the group described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "candidateUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the given user or to one of his groups." + }, + { + "name": "candidateUserExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the user described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "includeAssignedTasks", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Also include tasks that are assigned to users in candidate queries. Default is to only \ninclude tasks that are not assigned to any user if you query by candidate user or\ngroup(s)." + }, + { + "name": "involvedUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that the given user is involved in. A user is involved in a task if \nan identity link exists between task and user (e.g., the user is the assignee)." + }, + { + "name": "involvedUserExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that the user described by the given expression is involved in.\nA user is involved in a task if an identity link exists between task and user\n(e.g., the user is the assignee). See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + { + "name": "assigned", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + { + "name": "unassigned", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + { + "name": "taskDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given key." + }, + { + "name": "taskDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the given keys. The keys need to be in a\ncomma-separated list." + }, + { + "name": "taskDefinitionKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a key that has the parameter value as a substring." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given name." + }, + { + "name": "nameNotEqual", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that do not have the given name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + { + "name": "nameNotLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that do not have a name with the given parameter\nvalue as substring." + }, + { + "name": "description", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given description." + }, + { + "name": "descriptionLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a description that has the parameter\nvalue as a substring." + }, + { + "name": "priority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have the given priority." + }, + { + "name": "maxPriority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have a lower or equal priority." + }, + { + "name": "minPriority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have a higher or equal priority." + }, + { + "name": "dueDate", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "dueDateExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due on the date described by the given expression. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "dueAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.435+0200`." + }, + { + "name": "dueAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "dueBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.243+0200`." + }, + { + "name": "dueBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "withoutDueDate", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no due date. Value may only be `true`, \nas `false` is the default behavior." + }, + { + "name": "followUpDate", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.342+0200`." + }, + { + "name": "followUpDateExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date on the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ndate must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.542+0200`." + }, + { + "name": "followUpAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date after the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ndate must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.234+0200`." + }, + { + "name": "followUpBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date before the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpBeforeOrNotExistent", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have no followUp date or a followUp date before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.432+0200`. The\ntypical use case is to query all `active` tasks for a user for a given date." + }, + { + "name": "followUpBeforeOrNotExistentExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have no followUp date or a followUp date before the date\ndescribed by the given expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdOn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.324+0200`." + }, + { + "name": "createdOnExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created on the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.342+0200`." + }, + { + "name": "createdAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + { + "name": "createdBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "updatedAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were updated after the given date. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must\nhave the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + { + "name": "updatedAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were updated after the date described by the given expression. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "delegationState", + "in": "query", + "schema": { + "enum": [ + "PENDING", + "RESOLVED" + ], + "type": "string" + }, + "description": "Restrict to tasks that are in the given delegation state. Valid values are\n`PENDING` and `RESOLVED`." + }, + { + "name": "candidateGroups", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are offered to any of the given candidate groups. Takes a\ncomma-separated list of group names, so for example `developers,support,sales`." + }, + { + "name": "candidateGroupsExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are offered to any of the candidate groups described by the\ngiven expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to\n`java.util.List` of Strings." + }, + { + "name": "withCandidateGroups", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateGroups", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withCandidateUsers", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have a candidate user. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateUsers", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no candidate users. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "active", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include active tasks. Value may only be `true`, as `false`\nis the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include suspended tasks. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "taskVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that have variables with certain values. Variable filtering\nexpressions are comma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to process instances that have variables with certain \nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`;\n`notLike`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "caseInstanceVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to case instances that have variables with certain\nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable names in this query case-insensitively. If set\n`variableName` and `variablename` are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable values in this query case-insensitively. If set\n`variableValue` and `variablevalue` are treated as equal." + }, + { + "name": "parentTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all tasks that are sub tasks of the given task. Takes a task id." + }, + { + "name": "withCommentAttachmentInfo", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Check if task has attachments and/or comments. Value may only be `true`, as\n`false` is the default behavior.\nAdding the filter will do additional attachment and comments queries to the database,\nit might slow down the query in case of tables having high volume of data.\nThis param is not considered for count queries" + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "instanceId", + "caseInstanceId", + "dueDate", + "executionId", + "caseExecutionId", + "assignee", + "created", + "lastUpdated", + "description", + "id", + "name", + "nameCaseInsensitive", + "priority", + "processVariable", + "executionVariable", + "taskVariable", + "caseExecutionVariable", + "caseInstanceVariable" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskWithAttachmentAndCommentDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response 1", + "description": "Response for GET `/task?assignee\u003danAssignee\u0026delegationState\u003dRESOLVED\u0026maxPriority\u003d50`", + "value": [ + { + "id": "anId", + "name": "aName", + "assignee": "anAssignee", + "created": "2013-01-23T13:42:42.657+0200", + "due": "2013-01-23T13:49:42.323+0200", + "followUp:": "2013-01-23T13:44:42.987+0200", + "lastUpdated:": "2013-01-23T13:44:42.987+0200", + "delegationState": "RESOLVED", + "description": "aDescription", + "executionId": "anExecution", + "owner": "anOwner", + "parentTaskId": "aParentId", + "priority": 42, + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "taskDefinitionKey": "aTaskDefinitionKey", + "suspended": false, + "formKey": "aFormKey", + "camundaFormRef": { + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "taskState": "aTaskState" + } + ] + }, + "example-2": { + "summary": "Status 200 response 2", + "description": "Response for GET `/task?assignee\u003danAssignee\u0026withCommentAttachmentInfo\u003dtrue`", + "value": [ + { + "id": "anId", + "name": "aName", + "assignee": "anAssignee", + "created": "2013-01-23T13:42:42.657+0200", + "due": "2013-01-23T13:49:42.323+0200", + "followUp:": "2013-01-23T13:44:42.987+0200", + "lastUpdated:": "2013-01-23T13:44:42.987+0200", + "delegationState": "RESOLVED", + "description": "aDescription", + "executionId": "anExecution", + "owner": "anOwner", + "parentTaskId": "aParentId", + "priority": 42, + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "taskDefinitionKey": "aTaskDefinitionKey", + "suspended": false, + "formKey": "aFormKey", + "camundaFormRef": { + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "attachment": false, + "comment": false + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator for variable\ncomparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryTasks", + "tags": [ + "Task" + ], + "summary": "Get List (POST)", + "description": "Queries for tasks that fulfill a given filter. This method is slightly more powerful\nthan the [Get Tasks](https://docs.camunda.org/manual/7.22/reference/rest/task/get-query/) method because it\nallows filtering by multiple process or task variables of types `String`, `Number`\nor `Boolean`. The size of the result set can be retrieved by using the\n[Get Task Count (POST)](https://docs.camunda.org/manual/7.22/reference/rest/task/post-query-count/) method.\n\n**Security Consideration**:\nThere are several parameters (such as `assigneeExpression`) for specifying an EL\nexpression. These are disabled by default to prevent remote code execution. See the\nsection on\n[security considerations for custom code](https://docs.camunda.org/manual/7.22/user-guide/process-engine/securing-custom-code/)\nin the user guide for details.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task` Request Body 1", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "processInstanceBusinessKeyIn": "aBusinessKey,anotherBusinessKey", + "assigneeIn": "anAssignee,anotherAssignee", + "priority": 10, + "sorting": [ + { + "sortBy": "dueDate", + "sortOrder": "asc" + }, + { + "sortBy": "processVariable", + "sortOrder": "desc", + "parameters": { + "variable": "orderId", + "type": "String" + } + } + ] + } + }, + "example-2": { + "summary": "POST `/task` Request Body 2", + "description": "Logical query: assignee \u003d \"John Munda\" AND (name \u003d \"Approve Invoice\" OR priority \u003d 5) AND (suspended \u003d false OR taskDefinitionKey \u003d \"approveInvoice\")", + "value": { + "assignee": "John Munda", + "withCommentAttachmentInfo": "true", + "orQueries": [ + { + "name": "Approve Invoice", + "priority": 5 + }, + { + "suspended": false, + "taskDefinitionKey": "approveInvoice" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskWithAttachmentAndCommentDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 response 1", + "value": [ + { + "id": "anId", + "name": "aName", + "assignee": "anAssignee", + "created": "2013-01-23T13:42:42.453+0200", + "due": "2013-01-23T13:49:42.342+0200", + "followUp:": "2013-01-23T13:44:42.546+0200", + "lastUpdated:": "2013-01-23T13:44:42.546+0200", + "delegationState": "RESOLVED", + "description": "aDescription", + "executionId": "anExecution", + "owner": "anOwner", + "parentTaskId": "aParentId", + "priority": 10, + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "taskDefinitionKey": "aTaskDefinitionKey", + "suspended": false, + "formKey": "aFormKey", + "camundaFormRef": { + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "taskState": "aTaskState" + } + ] + }, + "example-2": { + "summary": "Status 200 response 2", + "value": [ + { + "id": "349fffa8-6571-11e7-9a44-d6940f5ef88d", + "name": "Approve Invoice", + "assignee": "John Munda", + "created": "2017-07-10T15:10:54.670+0200", + "due": "2017-07-17T15:10:54.670+0200", + "followUp": null, + "lastUpdated": "2017-07-17T15:10:54.670+0200", + "delegationState": null, + "description": "Approve the invoice (or not).", + "executionId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "invoice:1:2c8d8057-6571-11e7-9a44-d6940f5ef88d", + "processInstanceId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "taskDefinitionKey": "approveInvoice", + "caseExecutionId": null, + "caseInstanceId": null, + "caseDefinitionId": null, + "suspended": false, + "formKey": "embedded:app:develop/invoice-forms/approve-invoice.html", + "tenantId": null, + "taskState": "aTaskState", + "attachment": false, + "comment": false + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator for variable\ncomparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/count": { + "get": { + "operationId": "getTasksCount", + "tags": [ + "Task" + ], + "summary": "Get List Count", + "description": "Retrieves the number of tasks that fulfill a provided filter. Corresponds to the size\nof the result set when using the [Get Tasks](https://docs.camunda.org/manual/7.22/reference/rest/task/) method.\n\n**Security Consideration:** There are several query parameters (such as\nassigneeExpression) for specifying an EL expression. These are disabled by default to\nprevent remote code execution. See the section on\n[security considerations](https://docs.camunda.org/manual/7.22/user-guide/process-engine/securing-custom-code/)\nfor custom code in the user guide for details.", + "parameters": [ + { + "name": "taskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to task with the given id." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks with any of the given ids." + }, + { + "name": "processInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given id." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given ids." + }, + { + "name": "processInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given business key." + }, + { + "name": "processInstanceBusinessKeyExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given business key which \nis described by an expression. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + { + "name": "processInstanceBusinessKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with one of the give business keys. \nThe keys need to be in a comma-separated list." + }, + { + "name": "processInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring." + }, + { + "name": "processInstanceBusinessKeyLikeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring and is described by an expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "processDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given id." + }, + { + "name": "processDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + { + "name": "processDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with one of the given keys. The \nkeys need to be in a comma-separated list." + }, + { + "name": "processDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + { + "name": "processDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a process definition name that has the parameter value as \na substring." + }, + { + "name": "executionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to an execution with the given id." + }, + { + "name": "caseInstanceId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to case instances with the given id." + }, + { + "name": "caseInstanceBusinessKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to case instances with the given business key." + }, + { + "name": "caseInstanceBusinessKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a case instance business key that has the parameter value \nas a substring." + }, + { + "name": "caseDefinitionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given id." + }, + { + "name": "caseDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + { + "name": "caseDefinitionName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + { + "name": "caseDefinitionNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a case definition name that has the parameter value as a \nsubstring." + }, + { + "name": "caseExecutionId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a case execution with the given id." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated activity \ninstance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated \ntenant ids." + }, + { + "name": "withoutTenantId", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which belong to no tenant. Value may only be `true`, \nas `false` is the default behavior." + }, + { + "name": "assignee", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user is assigned to." + }, + { + "name": "assigneeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the user described by the given expression is assigned to. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "assigneeLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have an assignee that has the parameter \nvalue as a substring." + }, + { + "name": "assigneeLikeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have an assignee that has the parameter value described by the \ngiven expression as a substring. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "assigneeIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which are assigned to one of the passed and \ncomma-separated user ids." + }, + { + "name": "assigneeNotIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks which are not assigned to one of the passed and\ncomma-separated user ids." + }, + { + "name": "owner", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the given user owns." + }, + { + "name": "ownerExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that the user described by the given expression owns. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "candidateGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the given group." + }, + { + "name": "candidateGroupLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to groups that have the parameter value as a substring." + }, + { + "name": "candidateGroupExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the group described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "candidateUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the given user or to one of his groups." + }, + { + "name": "candidateUserExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that are offered to the user described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + { + "name": "includeAssignedTasks", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Also include tasks that are assigned to users in candidate queries. Default is to only \ninclude tasks that are not assigned to any user if you query by candidate user or\ngroup(s)." + }, + { + "name": "involvedUser", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that the given user is involved in. A user is involved in a task if \nan identity link exists between task and user (e.g., the user is the assignee)." + }, + { + "name": "involvedUserExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that the user described by the given expression is involved in.\nA user is involved in a task if an identity link exists between task and user\n(e.g., the user is the assignee). See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + { + "name": "assigned", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + { + "name": "unassigned", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + { + "name": "taskDefinitionKey", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given key." + }, + { + "name": "taskDefinitionKeyIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the given keys. The keys need to be in a\ncomma-separated list." + }, + { + "name": "taskDefinitionKeyLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a key that has the parameter value as a substring." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given name." + }, + { + "name": "nameNotEqual", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that do not have the given name." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + { + "name": "nameNotLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that do not have a name with the given parameter\nvalue as substring." + }, + { + "name": "description", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have the given description." + }, + { + "name": "descriptionLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a description that has the parameter\nvalue as a substring." + }, + { + "name": "priority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have the given priority." + }, + { + "name": "maxPriority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have a lower or equal priority." + }, + { + "name": "minPriority", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Restrict to tasks that have a higher or equal priority." + }, + { + "name": "dueDate", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.546+0200`." + }, + { + "name": "dueDateExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due on the date described by the given expression. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "dueAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.435+0200`." + }, + { + "name": "dueAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "dueBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.243+0200`." + }, + { + "name": "dueBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are due before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "withoutDueDate", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no due date. Value may only be `true`, \nas `false` is the default behavior." + }, + { + "name": "followUpDate", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.342+0200`." + }, + { + "name": "followUpDateExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date on the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ndate must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.542+0200`." + }, + { + "name": "followUpAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date after the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the\ndate must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g.,\n`2013-01-23T14:42:45.234+0200`." + }, + { + "name": "followUpBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have a followUp date before the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "followUpBeforeOrNotExistent", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have no followUp date or a followUp date before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.432+0200`. The\ntypical use case is to query all `active` tasks for a user for a given date." + }, + { + "name": "followUpBeforeOrNotExistentExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that have no followUp date or a followUp date before the date\ndescribed by the given expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdOn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.324+0200`." + }, + { + "name": "createdOnExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created on the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.342+0200`." + }, + { + "name": "createdAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "createdBefore", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + { + "name": "createdBeforeExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were created before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "updatedAfter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were updated after the given date. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must\nhave the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + { + "name": "updatedAfterExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that were updated after the date described by the given expression. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + { + "name": "delegationState", + "in": "query", + "schema": { + "enum": [ + "PENDING", + "RESOLVED" + ], + "type": "string" + }, + "description": "Restrict to tasks that are in the given delegation state. Valid values are\n`PENDING` and `RESOLVED`." + }, + { + "name": "candidateGroups", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are offered to any of the given candidate groups. Takes a\ncomma-separated list of group names, so for example `developers,support,sales`." + }, + { + "name": "candidateGroupsExpression", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict to tasks that are offered to any of the candidate groups described by the\ngiven expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to\n`java.util.List` of Strings." + }, + { + "name": "withCandidateGroups", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateGroups", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withCandidateUsers", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have a candidate user. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "withoutCandidateUsers", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include tasks which have no candidate users. Value may only be `true`,\nas `false` is the default behavior." + }, + { + "name": "active", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include active tasks. Value may only be `true`, as `false`\nis the default behavior." + }, + { + "name": "suspended", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Only include suspended tasks. Value may only be `true`, as\n`false` is the default behavior." + }, + { + "name": "taskVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that have variables with certain values. Variable filtering\nexpressions are comma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "processVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to process instances that have variables with certain \nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`;\n`notLike`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "caseInstanceVariables", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include tasks that belong to case instances that have variables with certain\nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`. `key` is the variable name,\n`operator` is the comparison operator to be used and `value` the variable value.\n\n**Note**: Values are always treated as String objects on server side.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable names in this query case-insensitively. If set\n`variableName` and `variablename` are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Match all variable values in this query case-insensitively. If set\n`variableValue` and `variablevalue` are treated as equal." + }, + { + "name": "parentTaskId", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Restrict query to all tasks that are sub tasks of the given task. Takes a task id." + }, + { + "name": "withCommentAttachmentInfo", + "in": "query", + "schema": { + "default": false, + "type": "boolean" + }, + "description": "Check if task has attachments and/or comments. Value may only be `true`, as\n`false` is the default behavior.\nAdding the filter will do additional attachment and comments queries to the database,\nit might slow down the query in case of tables having high volume of data.\nThis param is not considered for count queries" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryTasksCount", + "tags": [ + "Task" + ], + "summary": "Get List Count (POST)", + "description": "Retrieves the number of tasks that fulfill the given filter. Corresponds to the size\nof the result set of the [Get Tasks (POST)](https://docs.camunda.org/manual/7.22/reference/rest/task/post-query/)\nmethod and takes the same parameters.\n\n**Security Consideration**:\nThere are several parameters (such as `assigneeExpression`) for specifying an EL\nexpression. These are disabled by default to prevent remote code execution. See the\nsection on\n[security considerations for custom code](https://docs.camunda.org/manual/7.22/user-guide/process-engine/securing-custom-code/)\nin the user guide for details.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task` Request Body 1", + "value": { + "taskVariables": [ + { + "name": "varName", + "value": "varValue", + "operator": "eq" + }, + { + "name": "anotherVarName", + "value": 30, + "operator": "neq" + } + ], + "processInstanceBusinessKeyIn": "aBusinessKey,anotherBusinessKey", + "assigneeIn": "anAssignee,anotherAssignee", + "priority": 10, + "sorting": [ + { + "sortBy": "dueDate", + "sortOrder": "asc" + }, + { + "sortBy": "processVariable", + "sortOrder": "desc", + "parameters": { + "variable": "orderId", + "type": "String" + } + } + ] + } + }, + "example-2": { + "summary": "POST `/task` Request Body 2", + "description": "Logical query: assignee \u003d \"John Munda\" AND (name \u003d \"Approve Invoice\" OR priority \u003d 5) AND (suspended \u003d false OR taskDefinitionKey \u003d \"approveInvoice\")", + "value": { + "assignee": "John Munda", + "orQueries": [ + { + "name": "Approve Invoice", + "priority": 5 + }, + { + "suspended": false, + "taskDefinitionKey": "approveInvoice" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 response", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/create": { + "post": { + "operationId": "createTask", + "tags": [ + "Task" + ], + "summary": "Create", + "description": "Creates a new task.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskDto" + }, + "examples": { + "example-1": { + "summary": "POST /task/create", + "value": { + "id": "aTaskId", + "name": "My Task", + "description": "This have to be done very urgent", + "priority": 30, + "assignee": "peter", + "owner": "mary", + "delegationState": "PENDING", + "due": "2014-08-30T10:00:00.000+0200", + "followUp": "2014-08-25T10:00:00.000+0200", + "parentTaskId": "aParentTaskId", + "caseInstanceId": "aCaseInstanceId", + "tenantId": null + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if a not valid `delegationState` is supplied. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/report/candidate-group-count": { + "get": { + "operationId": "getTaskCountByCandidateGroup", + "tags": [ + "Task" + ], + "summary": "Get Task Count By Candidate Group", + "description": "Retrieves the number of tasks for each candidate group.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskCountByCandidateGroupResultDto" + } + }, + "examples": { + "example-1": { + "value": [ + { + "groupName": null, + "taskCount": 1 + }, + { + "groupName": "aGroupName", + "taskCount": 2 + }, + { + "groupName": "anotherGroupName", + "taskCount": 3 + } + ] + } + } + }, + "application/csv": { + "schema": {} + }, + "text/csv": { + "schema": {} + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid or mandatory parameters are not supplied. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the authenticated user is unauthorized to read the history. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}": { + "delete": { + "operationId": "deleteTask", + "tags": [ + "Task" + ], + "summary": "Delete", + "description": "Removes a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to be removed." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Bad Request. The Task with the given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The Task with the given id cannot be deleted because it is part of a running process or case instance.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for\nthe error response format." + } + } + }, + "get": { + "operationId": "getTask", + "tags": [ + "Task" + ], + "summary": "Get", + "description": "Retrieves a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskWithAttachmentAndCommentDto" + }, + "examples": { + "example-1": { + "summary": "GET /task/anId Response", + "value": { + "id": "anId", + "name": "aName", + "assignee": "anAssignee", + "created": "2013-01-23T13:42:42.000+0200", + "due": "2013-01-23T13:49:42.576+0200", + "followUp": "2013-01-23T13:44:42.437+0200", + "delegationState": "RESOLVED", + "description": "aDescription", + "executionId": "anExecution", + "owner": "anOwner", + "parentTaskId": "aParentId", + "priority": 42, + "processDefinitionId": "aProcDefId", + "processInstanceId": "aProcInstId", + "caseDefinitionId": "aCaseDefId", + "caseInstanceId": "aCaseInstId", + "caseExecutionId": "aCaseExecution", + "taskDefinitionKey": "aTaskDefinitionKey", + "suspended": false, + "formKey": "aFormKey", + "camundaFormRef": { + "key": "aCamundaFormKey", + "binding": "version", + "version": 2 + }, + "tenantId": "aTenantId", + "taskState": "aTaskState" + } + }, + "example-2": { + "summary": "GET /task/anId?withCommentAttachmentInfo\u003dtrue Response", + "value": [ + { + "id": "349fffa8-6571-11e7-9a44-d6940f5ef88d", + "name": "Approve Invoice", + "assignee": "John Munda", + "created": "2017-07-10T15:10:54.670+0200", + "due": "2017-07-17T15:10:54.670+0200", + "followUp": null, + "lastUpdated": "2017-07-17T15:10:54.670+0200", + "delegationState": null, + "description": "Approve the invoice (or not).", + "executionId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "owner": null, + "parentTaskId": null, + "priority": 50, + "processDefinitionId": "invoice:1:2c8d8057-6571-11e7-9a44-d6940f5ef88d", + "processInstanceId": "349f8a5c-6571-11e7-9a44-d6940f5ef88d", + "taskDefinitionKey": "approveInvoice", + "caseExecutionId": null, + "caseInstanceId": null, + "caseDefinitionId": null, + "suspended": false, + "formKey": "embedded:app:develop/invoice-forms/approve-invoice.html", + "tenantId": null, + "taskState": "aTaskState", + "attachment": false, + "comment": false + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "updateTask", + "tags": [ + "Task" + ], + "summary": "Update", + "description": "Updates a task.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskDto" + }, + "examples": { + "example-1": { + "summary": "PUT /task/aTaskId/ Response", + "value": { + "name": "My Task", + "description": "This have to be done very urgent", + "priority": 30, + "assignee": "peter", + "owner": "mary", + "delegationState": "PENDING", + "due": "2014-08-30T10:00:00.000+0200", + "followUp": "2014-08-25T10:00:00.000+0200", + "parentTaskId": "aParentTaskId", + "caseInstanceId": "aCaseInstanceId", + "tenantId": "tenantId" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if a not valid `delegationState` is supplied. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the corresponding task cannot be found." + } + } + } + }, + "/task/{id}/assignee": { + "post": { + "operationId": "setAssignee", + "tags": [ + "Task" + ], + "summary": "Set Assignee", + "description": "Changes the assignee of a task to a specific user.\n\n**Note:** The difference with the [Claim Task](https://docs.camunda.org/manual/7.22/reference/rest/task/post-claim/)\nmethod is that this method does not check if the task already has a user\nassigned to it.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to set the assignee for." + } + ], + "requestBody": { + "description": "Provide the id of the user that will be the assignee of the task.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserIdDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/assignee`", + "value": { + "userId": "aUserId" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist or setting the assignee was not successful.\nSee the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/attachment": { + "get": { + "operationId": "getAttachments", + "tags": [ + "Task Attachment" + ], + "summary": "Get List", + "description": "Gets the attachments for a task.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the attachments for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttachmentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/attachment", + "value": [ + { + "id": "attachmentId", + "name": "attachmentName", + "taskId": "aTaskId", + "description": "attachmentDescription", + "type": "attachmentType", + "url": "http://my-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "anotherAttachmentId", + "name": "anotherAttachmentName", + "taskId": "aTaskId", + "description": "anotherAttachmentDescription", + "type": "anotherAttachmentType", + "url": "http://my-another-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "yetAnotherAttachmentId", + "name": "yetAnotherAttachmentName", + "taskId": "aTaskId", + "description": "yetAnotherAttachmentDescription", + "type": "yetAnotherAttachmentType", + "url": "http://yet-another-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No task exists for the given task id. See the [Introduction](/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/attachment/create": { + "post": { + "operationId": "addAttachment", + "tags": [ + "Task Attachment" + ], + "summary": "Create", + "description": "Creates an attachment for a task.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to add the attachment to." + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormAttachmentDto" + }, + "examples": { + "example-1": { + "summary": "POST /task/aTaskId/attachment/create", + "description": "Post data for a new task attachment.", + "value": "------------------------------925df49a954b\n Content-Disposition: form-data; name\u003d\"url\"\n\n http://my-attachment-content-url.de\n ------------------------------925df49a954b\n Content-Disposition: form-data; name\u003d\"attachment-name\"\n\n attachmentName\n ------------------------------925df49a954b\n Content-Disposition: form-data; name\u003d\"attachment-description\"\n\n attachmentDescription\n ------------------------------925df49a954b\n Content-Disposition: form-data; name\u003d\"attachment-type\"\n\n attachmentType\n ------------------------------925df49a954b--" + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "id": "attachmentId", + "name": "attachmentName", + "taskId": "aTaskId", + "description": "attachmentDescription", + "type": "attachmentType", + "url": "http://my-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/task/aTaskId/attachment/aTaskAttachmentId", + "rel": "self" + } + ] + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The task does not exists or task id is null. No content or url to remote content exists. See the\n[Introduction](/reference/rest/overview/#error-handling) for the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The history of the engine is disabled. See the [Introduction](/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/attachment/{attachmentId}": { + "delete": { + "operationId": "deleteAttachment", + "tags": [ + "Task Attachment" + ], + "summary": "Delete", + "description": "Removes an attachment from a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task." + }, + { + "name": "attachmentId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the attachment to be removed." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The history of the engine is disabled. See the [Introduction](/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "A Task Attachment for the given task id and attachment id does not exist. See the\n[Introduction](/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getAttachment", + "tags": [ + "Task Attachment" + ], + "summary": "Get", + "description": "Retrieves a task attachment by task id and attachment id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task." + }, + { + "name": "attachmentId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the attachment to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentDto" + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/attachment/aTaskAttachmentId", + "value": { + "id": "attachmentId", + "name": "attachmentName", + "taskId": "aTaskId", + "description": "attachmentDescription", + "type": "attachmentType", + "url": "http://my-attachment-content-url.de", + "createTime": "2017-02-10T14:33:19.000+0200", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId", + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/task/aTaskId/attachment/aTaskAttachmentId", + "rel": "self" + } + ] + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The attachment for the given task and attachment id does not exist or the history of the engine is\ndisabled.\n\nSee the [Introduction](/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/task/{id}/attachment/{attachmentId}/data": { + "get": { + "operationId": "getAttachmentData", + "tags": [ + "Task Attachment" + ], + "summary": "Get (Binary)", + "description": "Retrieves the binary content of a task attachment by task id and attachment id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task." + }, + { + "name": "attachmentId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the attachment to be retrieved." + } + ], + "responses": { + "200": { + "description": "Request successful.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For files without any MIME type information, a byte stream is returned." + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information are returned as the saved type. Additionally, for file\n responses, the Content-Disposition header will be set." + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The attachment content for the given task id and attachment id does not exist, or the history of the\nengine is disabled.\n\nSee the [Introduction](/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/task/{id}/bpmnError": { + "post": { + "operationId": "handleBpmnError", + "tags": [ + "Task" + ], + "summary": "Handle BPMN Error", + "description": "Reports a business error in the context of a running task by id. The error code must\nbe specified to identify the BPMN error handler. See the documentation for\n[Reporting Bpmn Error](https://docs.camunda.org/manual/7.22/reference/bpmn20/tasks/user-task/#reporting-bpmn-error)\nin User Tasks.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task a BPMN error is reported for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskBpmnErrorDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/aTaskId/bpmnError`", + "value": { + "errorCode": "bpmn-error-543", + "errorMessage": "anErrorMessage", + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the `errorCode` or `id` are not present in the request. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "If the authenticated user is unauthorized to update the task. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/bpmnEscalation": { + "post": { + "operationId": "handleEscalation", + "tags": [ + "Task" + ], + "summary": "Handle BPMN Escalation", + "description": "Reports an escalation in the context of a running task by id. The escalation code must\nbe specified to identify the escalation handler. See the documentation for\n[Reporting Bpmn Escalation](https://docs.camunda.org/manual/7.22/reference/bpmn20/tasks/user-task/#reporting-bpmn-escalation)\nin User Tasks.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task in which context a BPMN escalation is reported." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskEscalationDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/aTaskId/bpmnEscalation`", + "value": { + "escalationCode": "bpmn-escalation-432", + "variables": { + "aVariable": { + "value": "aStringValue", + "type": "String" + }, + "anotherVariable": { + "value": true, + "type": "Boolean" + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the \u003ccode\u003eescalationCode\u003c/code\u003e is not provided in\nthe request. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "If the authenticated user is unauthorized to update the process instance. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if the task does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/claim": { + "post": { + "operationId": "claim", + "tags": [ + "Task" + ], + "summary": "Claim", + "description": "Claims a task for a specific user.\n\n**Note:** The difference with the\n[Set Assignee](https://docs.camunda.org/manual/7.22/reference/rest/task/post-assignee/)\nmethod is that here a check is performed to see if the task already has a user\nassigned to it.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to claim." + } + ], + "requestBody": { + "description": "Provide the id of the user that claims the task.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserIdDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/claim`", + "value": { + "userId": "aUserId" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist or claiming was not successful. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/comment": { + "get": { + "operationId": "getComments", + "tags": [ + "Task Comment" + ], + "summary": "Get List", + "description": "Gets the comments for a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the comments for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/comment", + "value": [ + { + "id": "commentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-01-02T21:37:03.764+0200", + "message": "message", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "anotherCommentId", + "userId": "anotherUserId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-02-23T20:37:43.975+0200", + "message": "anotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + }, + { + "id": "yetAnotherCommentId", + "userId": "yetAnotherUserId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-04-21T10:15:23.764+0200", + "message": "yetAnotherMessage", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No task exists for the given task id. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/comment/create": { + "post": { + "operationId": "createComment", + "tags": [ + "Task Comment" + ], + "summary": "Create", + "description": "Creates a comment for a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to add the comment to." + } + ], + "requestBody": { + "description": "**Note:** Only the `message` and `processInstanceId` properties will be used. Every other property passed to this endpoint will be ignored.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentDto" + }, + "examples": { + "example-1": { + "summary": "POST /task/aTaskId/comment/create", + "value": { + "message": "a task comment", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687" + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:38080/rest-test/task/aTaskId/comment/aTaskCommentId", + "rel": "self" + } + ], + "id": "aTaskCommentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-01-02T21:37:03.887+0200", + "message": "comment message", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The task does not exist or no comment message was submitted. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The history of the engine is disabled. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/comment/{commentId}": { + "get": { + "operationId": "getComment", + "tags": [ + "Task Comment" + ], + "summary": "Get", + "description": "Retrieves a task comment by task id and comment id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task." + }, + { + "name": "commentId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the comment to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentDto" + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/comment", + "value": { + "id": "aTaskCommentId", + "userId": "userId", + "taskId": "aTaskId", + "processInstanceId": "96dc383f-23eb-11e6-8e4a-f6aefe19b687", + "time": "2013-01-02T21:37:03.664+0200", + "message": "comment content", + "removalTime": "2018-02-10T14:33:19.000+0200", + "rootProcessInstanceId": "aRootProcessInstanceId" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The task or comment with given task and comment id does not exist, or the history of\nthe engine is disabled. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/complete": { + "post": { + "operationId": "complete", + "tags": [ + "Task" + ], + "summary": "Complete", + "description": "Completes a task and updates process variables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to complete." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompleteTaskDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/anId/complete`", + "description": "Complete Task with variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + }, + "withVariablesInReturn": true + } + }, + "example-2": { + "summary": "POST `/task/anId/complete`", + "description": "Complete Task without variables in return", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "POST `/task/anId/complete`", + "description": "Response Body", + "value": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + } + } + } + } + }, + "description": "Request successful. The response contains the process variables." + }, + "204": { + "description": "Request successful. The response contains no variables." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the task does not exist or the corresponding process instance could not be\nresumed successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/delegate": { + "post": { + "operationId": "delegateTask", + "tags": [ + "Task" + ], + "summary": "Delegate", + "description": "Delegates a task to another user.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to delegate." + } + ], + "requestBody": { + "description": "Provide the id of the user that the task should be delegated to.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserIdDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/delegate`", + "value": { + "userId": "aUserId" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the task does not exist or delegation was not successful. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/deployed-form": { + "get": { + "operationId": "getDeployedForm", + "tags": [ + "Task" + ], + "summary": "Get Deployed Form", + "description": "Retrieves the deployed form that is referenced from a given task. For further\ninformation please refer to the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#embedded-task-forms).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to get the deployed form for." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "Resonse for GET `/task/taskId/deployed-form`", + "value": "\u003cform role\u003d\"form\" name\u003d\"invoiceForm\"\n class\u003d\"form-horizontal\"\u003e\n \u003cdiv class\u003d\"form-group\"\u003e\n \u003clabel class\u003d\"control-label col-md-4\"\n for\u003d\"creditor\"\u003eCreditor\u003c/label\u003e\n \u003cdiv class\u003d\"col-md-8\"\u003e\n \u003cinput cam-variable-name\u003d\"creditor\"\n cam-variable-type\u003d\"String\"\n id\u003d\"creditor\"\n class\u003d\"form-control\"\n type\u003d\"text\"\n required /\u003e\n \u003cdiv class\u003d\"help\"\u003e\n (e.g. \u0026quot;Great Pizza for Everyone Inc.\u0026quot;)\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/form\u003e" + } + } + }, + "application/json": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/json` Responses, a byte stream is returned." + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The form key has wrong format. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationExceptionDto" + } + } + }, + "description": "The deployed form cannot be retrieved due to missing permissions on task resource.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "No deployed form for a given task exists. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/form": { + "get": { + "operationId": "getForm", + "tags": [ + "Task" + ], + "summary": "Get Form Key", + "description": "Retrieves the form key for a task. The form key corresponds to the `FormData#formKey`\nproperty in the engine. This key can be used to do task-specific form rendering in\nclient applications. Additionally, the context path of the containing process\napplication is returned.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the form for." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `/task/anId/form`", + "value": { + "key": "aFormKey", + "contextPath": "http://localhost:8080/my-process-application/" + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/form-variables": { + "get": { + "operationId": "getFormVariables", + "tags": [ + "Task" + ], + "summary": "Get Task Form Variables", + "description": "Retrieves the form variables for a task. The form variables take form data specified\non the task into account. If form fields are defined, the variable types and default\nvalues of the form fields are taken into account.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variables for." + }, + { + "name": "variableNames", + "in": "query", + "schema": { + "type": "string" + }, + "description": "A comma-separated list of variable names. Allows restricting the list of requested\nvariables to the variable names in the list. It is best practice to restrict the\nlist of variables to the variables actually required by the form in order to\nminimize fetching of data. If the query parameter is ommitted all variables are\nfetched. If the query parameter contains non-existent variable names, the variable\nnames are ignored." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store\ncustom Java objects) should be deserialized on server side (default true).\n\nIf set to true, a serializable variable will be deserialized on server side and\ntransformed to JSON using [Jackson\u0027s](http://jackson.codehaus.org/) POJO/bean\nproperty introspection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to false, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string\ncontaining XML.\n\nNote: While true is the default value for reasons of backward compatibility, we\nrecommend setting this parameter to false when developing web applications that are\nindependent of the Java process applications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "GET `/task/anId/form-variables`", + "value": { + "amount": { + "type": "integer", + "value": 5, + "valueInfo": {} + }, + "firstName": { + "type": "String", + "value": "Jonny", + "valueInfo": {} + } + } + } + } + } + }, + "description": "Request successful. A JSON object containing a property for each variable returned." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": " id is null or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/identity-links": { + "get": { + "operationId": "getIdentityLinks", + "tags": [ + "Task Identity Link" + ], + "summary": "Get List", + "description": "Gets the identity links for a task by id, which are the users and groups that are in\n*some* relation to it (including assignee and owner).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the identity links for." + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the type of links to include." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IdentityLinkDto" + } + }, + "examples": { + "example-1": { + "summary": "GET /task/anId/identityLinks", + "value": [ + { + "userId": "userId", + "groupId": null, + "type": "assignee" + }, + { + "userId": null, + "groupId": "groupId1", + "type": "candidate" + }, + { + "userId": null, + "groupId": "groupId2", + "type": "candidate" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + }, + "post": { + "operationId": "addIdentityLink", + "tags": [ + "Task Identity Link" + ], + "summary": "Add", + "description": "Adds an identity link to a task by id. Can be used to link any user or group to a task\nand specify a relation.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to add a link to." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentityLinkDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/anId/identity-links`", + "value": { + "groupId": "aNewGroupId", + "type": "candidate" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for the error response format." + } + } + } + }, + "/task/{id}/identity-links/delete": { + "post": { + "operationId": "deleteIdentityLink", + "tags": [ + "Task Identity Link" + ], + "summary": "Delete", + "description": "Removes an identity link from a task by id", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to remove a link from." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdentityLinkDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/anId/identityLinks/delete`", + "value": { + "groupId": "theOldGroupId", + "type": "candidate" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task with given id does not exist.\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for\nthe error response format." + } + } + } + }, + "/task/{id}/localVariables": { + "get": { + "operationId": "getTaskLocalVariables", + "tags": [ + "Task Local Variable" + ], + "summary": "Get Local Task Variables", + "description": "Retrieves all variables of a given task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variables from." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on the server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward compatibility, we recommend setting this\nparameter to `false` when developing web applications that are independent of the Java process\napplications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/task/aTaskId/variables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }, + "example-2": { + "summary": "GET `/task/aTaskId/variables?deserializeValue\u003dfalse`", + "value": { + "aVariableKey": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "modifyTaskLocalVariables", + "tags": [ + "Task Local Variable" + ], + "summary": "Update/Delete Local Task Variables", + "description": "Updates or deletes the variables in the context of a task. Updates precede deletions. So, if a variable is\nupdated AND deleted, the deletion overrides the update.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to set variables for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchVariablesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/aTaskId/variables`", + "description": "Status 204 Response: No content.", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid. For example the value could not be parsed to an `Integer` value\nor the passed variable type is not supported. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Update or delete could not be executed because the task is `null` or does not exist.. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/localVariables/{varName}": { + "delete": { + "operationId": "deleteTaskLocalVariable", + "tags": [ + "Task Local Variable" + ], + "summary": "Delete Local Task Variable", + "description": "Removes a local variable from a task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to delete the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to be removed." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getTaskLocalVariable", + "tags": [ + "Task Local Variable" + ], + "summary": "Get Local Task Variable", + "description": "Retrieves a variable from the context of a given task by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to get" + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on the server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\nNote: While `true` is the default value for reasons of backward compatibility, we recommend setting this\nparameter to `false` when developing web applications that are independent of the Java process\napplications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "GET `/task/aTaskId/variables/myObject123`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }, + "example-2": { + "summary": "GET `/task/aTaskId/variables/myObject123?deserializeValue\u003dfalse`", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "putTaskLocalVariable", + "tags": [ + "Task Local Variable" + ], + "summary": "Update Local Task Variable", + "description": "Sets a variable in the context of a given task.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to set the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to set." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "someValue", + "type": "String" + } + }, + "example-2": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "An Object Variable PUT Request. Status 204. No content.", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable name, value or type is invalid, for example if the value could not be parsed to an `Integer`\nvalue or the passed variable type is not supported or a new transient variable has the name that is\nalready persisted. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable name is `null`, or the Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/localVariables/{varName}/data": { + "get": { + "operationId": "getTaskLocalVariableBinary", + "tags": [ + "Task Local Variable" + ], + "summary": "Get Local Task Variable (Binary)", + "description": "Retrieves a binary variable from the context of a given task by id. Applicable for byte array and file\nvariables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "responses": { + "200": { + "description": "Request successful.\n For binary variables or files without any MIME type information, a byte stream is returned.\n File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "binary variable: Status 200. Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "file variable: Status 200. Content-Type: text/plain; charset\u003dUTF-8. Content-Disposition: attachment; filename\u003d\"someFile.txt\"" + } + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id exists but is not a binary variable.See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "setBinaryTaskLocalVariable", + "tags": [ + "Task Local Variable" + ], + "summary": "Update Local Task Variable (Binary)", + "description": "Sets the serialized value for a binary variable or the binary value for a file variable.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "requestBody": { + "description": "For binary variables a multipart form submit with the following parts:", + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormVariableBinaryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (1)", + "description": "Post binary content of a byte array variable.", + "value": "\n ```\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"image.png\"\n Content-Type: application/octet-stream\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n Bytes\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-2": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (2)", + "description": "Post the JSON serialization of a Java Class (**deprecated**).", + "value": "\n ```\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"type\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n java.util.ArrayList\u003cjava.lang.Object\u003e\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"data\"\n Content-Type: application/json; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n [\"foo\",\"bar\"]\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-3": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (3)", + "description": "Post a text file.", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"myFile.txt\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n File\n ------------------------------1e838f8f632a--\n ```\n " + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if no filename is set. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable name is `null`, or the Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/rendered-form": { + "get": { + "operationId": "getRenderedForm", + "tags": [ + "Task" + ], + "summary": "Get Rendered Form", + "description": "Retrieves the rendered form for a task. This method can be used to get the HTML\nrendering of a\n[Generated Task Form](https://docs.camunda.org/manual/7.22/user-guide/task-forms/#generated-task-forms).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to get the rendered form for." + } + ], + "responses": { + "200": { + "content": { + "application/xhtml+xml": { + "schema": { + "type": "string", + "format": "binary", + "description": "For `application/xhtml+xml` Responses, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "A `/task/anId/rendered-form` HTML GET response body providing the rendered (generated) form content.", + "value": "\u003cform class\u003d\"form-horizontal\"\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eCustomer ID\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"string\" name\u003d\"customerId\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"control-group\"\u003e\n \u003clabel class\u003d\"control-label\"\u003eAmount\u003c/label\u003e\n \u003cdiv class\u003d\"controls\"\u003e\n \u003cinput form-field type\u003d\"number\" name\u003d\"amount\"\u003e\u003c/input\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003c/form\u003e" + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The task with the given id does not exist or has no form field metadata defined for\nthis task. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/resolve": { + "post": { + "operationId": "resolve", + "tags": [ + "Task" + ], + "summary": "Resolve", + "description": "Resolves a task and updates execution variables.\n\nResolving a task marks that the assignee is done with the task delegated to them, and\nthat it can be sent back to the owner. Can only be executed when the task has been\ndelegated. The assignee will be set to the owner, who performed the delegation.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to resolve." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompleteTaskDto" + }, + "examples": { + "example-1": { + "summary": "Request Body", + "description": "POST `/task/anId/resolve`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed\nto an Integer value or the passed variable type is not supported. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the task does not exist or the corresponding process instance could not be\nresumed successfully. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/submit-form": { + "post": { + "operationId": "submit", + "tags": [ + "Task" + ], + "summary": "Submit Form", + "description": "Completes a task and updates process variables using a form submit. There are two\ndifference between this method and the `complete` method:\n\n* If the task is in state `PENDING` - i.e., has been delegated before, it is not\ncompleted but resolved. Otherwise it will be completed.\n* If the task has Form Field Metadata defined, the process engine will perform backend\nvalidation for any form fields which have validators defined.\nSee the\n[Generated Task Forms](https://docs.camunda.org/manual/7.22/user-guide/task-forms/_index/#generated-task-forms)\nsection of the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/) for more information.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to submit the form for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompleteTaskDto" + }, + "examples": { + "example-1": { + "summary": "Request Body 1", + "description": "POST `/task/anId/submit-form`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + }, + "aFileVariable": { + "value": "TG9yZW0gaXBzdW0\u003d", + "type": "File", + "valueInfo": { + "filename": "myFile.txt" + } + } + } + } + }, + "example-2": { + "summary": "Request Body 2", + "description": "POST `/task/anId/complete`", + "value": { + "variables": { + "aVariable": { + "value": "aStringValue" + }, + "anotherVariable": { + "value": 42 + }, + "aThirdVariable": { + "value": true + } + }, + "withVariablesInReturn": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "Response Body", + "description": "Response of a submitted task form with variables in return", + "value": { + "aVariable": { + "value": "aStringValue", + "type": "String", + "valueInfo": {} + }, + "anotherVariable": { + "value": 42, + "type": "Integer", + "valueInfo": {} + }, + "aThirdVariable": { + "value": true, + "type": "Boolean", + "valueInfo": {} + } + } + } + } + } + }, + "description": "Request successful. The response contains the process variables." + }, + "204": { + "description": "Request successful. The response contains no variables." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if the value could not be parsed to an Integer value\nor the passed variable type is not supported.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for\nthe error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the task does not exist or the corresponding process instance could not be resumed successfully.\n\nSee the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling) for\nthe error response format." + } + } + } + }, + "/task/{id}/unclaim": { + "post": { + "operationId": "unclaim", + "tags": [ + "Task" + ], + "summary": "Unclaim", + "description": "Resets a task\u0027s assignee. If successful, the task is not assigned to a user.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to unclaim." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The Task with the given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/variables": { + "get": { + "operationId": "getTaskVariables", + "tags": [ + "Task Variable" + ], + "summary": "Get Task Variables", + "description": "Retrieves all variables visible from the task. A variable is visible from the task if it is a local task\nvariable or declared in a parent scope of the task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variables from." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on the server side (default `true`).\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\nNote: While `true` is the default value for reasons of backward compatibility, we recommend setting this\nparameter to `false` when developing web applications that are independent of the Java process\napplications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/task/aTaskId/variables`", + "value": { + "aVariableKey": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + }, + "example-2": { + "summary": "GET `/task/aTaskId/variables?deserializeValue\u003dfalse`", + "value": { + "aVariableKey": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "modifyTaskVariables", + "tags": [ + "Task Variable" + ], + "summary": "Update/Delete Task Variables", + "description": "Updates or deletes the variables visible from the task. Updates precede deletions. So, if a variable is\nupdated AND deleted, the deletion overrides the update. A variable is visible from the task if it is a\nlocal task variable or declared in a parent scope of the task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to set variables for." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchVariablesDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/aTaskId/variables`", + "description": "Status 204 Response: No content.", + "value": { + "modifications": { + "aVariable": { + "value": "aValue", + "type": "String" + }, + "anotherVariable": { + "value": 42, + "type": "Integer" + } + }, + "deletions": [ + "aThirdVariable", + "FourthVariable" + ] + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid. For example the value could not be parsed to an `Integer` value\nor the passed variable type is not supported. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Update or delete could not be executed because the task is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/variables/{varName}": { + "delete": { + "operationId": "deleteTaskVariable", + "tags": [ + "Task Variable" + ], + "summary": "Delete Task Variable", + "description": "Removes a variable that is visible to a task. A variable is visible to a task if it is a local task\nvariable or declared in a parent scope of the task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to delete the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to be removed." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is null or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getTaskVariable", + "tags": [ + "Task Variable" + ], + "summary": "Get Task Variable", + "description": "Retrieves a variable from the context of a given task.\nThe variable must be visible from the task. It is visible from the task if it is a local task variable or\ndeclared in a parent scope of the task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable from." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to get." + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "default": true, + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on the server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\nNote: While `true` is the default value for reasons of backward compatibility, we recommend setting this\nparameter to `false` when developing web applications that are independent of the Java process\napplications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "GET `/task/aTaskId/variables/myObject123`", + "value": { + "value": { + "prop1": "a", + "prop2": "b" + }, + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + }, + "example-2": { + "summary": "GET `/task/aTaskId/variables/myObject123?deserializeValue\u003dfalse`", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "putTaskVariable", + "tags": [ + "Task Variable" + ], + "summary": "Update Task Variable", + "description": "Updates a process variable that is visible from the Task scope. A variable is visible from the task if it\nis a local task variable, or declared in a parent scope of the task. See the documentation on\n[variable scopes and visibility](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables#variable-scopes-and-variable-visibility).\n\n**Note**: If a variable doesn\u0027t exist, the variable is created in the top-most scope\nvisible from the task.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to set the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to set." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "examples": { + "example-1": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "someValue", + "type": "String" + } + }, + "example-2": { + "summary": "PUT /task/aTaskId/variables/aVarName", + "description": "Status 204. No content.", + "value": { + "value": "ab", + "type": "Object", + "valueInfo": { + "objectTypeName": "com.example.MyObject", + "serializationDataFormat": "application/xml" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable name, value or type is invalid, for example if the value could not be parsed to an `Integer`\nvalue or the passed variable type is not supported or a new transient variable has the name that is\nalready persisted. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable name is `null`, or the Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/task/{id}/variables/{varName}/data": { + "get": { + "operationId": "getTaskVariableBinary", + "tags": [ + "Task Variable" + ], + "summary": "Get Task Variable (Binary)", + "description": "Retrieves a binary variable from the context of a given task. Applicable for byte array and file\nvariables. The variable must be visible from the task. It is visible from the task if it is a local task\nvariable or declared in a parent scope of the task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "responses": { + "200": { + "description": "Request successful.\n For binary variables or files without any MIME type information, a byte stream is returned.\n File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For binary variables or files without any MIME type information, a byte stream is returned." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "binary variable: Status 200. Content-Type: application/octet-stream" + } + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary", + "description": "File variables with MIME type information are returned as the saved type.\n Additionally, for file variables the Content-Disposition header will be set." + }, + "examples": { + "example-1": { + "summary": "GET /task/aTaskId/variables/aVarName/data", + "value": "file variable: Status 200. Content-Type: text/plain; charset\u003dUTF-8. Content-Disposition: attachment; filename\u003d\"someFile.txt\"" + } + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id exists but is not a binary variable.See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "setBinaryTaskVariable", + "tags": [ + "Task Variable" + ], + "summary": "Update Task Variable (Binary)", + "description": "Sets the serialized value for a binary variable or the binary value for a file variable visible from the\ntask. A variable is visible from the task if it is a local task variable or declared in a parent scope of\nthe task. See documentation on\n[visiblity of variables](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/).", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the task to retrieve the variable for." + }, + { + "name": "varName", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The name of the variable to retrieve." + } + ], + "requestBody": { + "description": "For binary variables a multipart form submit with the following parts:", + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/MultiFormVariableBinaryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (1)", + "description": "Post binary content of a byte array variable.", + "value": "\n ```\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"image.png\"\n Content-Type: application/octet-stream\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ------------------------------354ddb6baeff\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n Bytes\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-2": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (2)", + "description": "Post the JSON serialization of a Java Class (**deprecated**).", + "value": "\n ```\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"type\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n java.util.ArrayList\u003cjava.lang.Object\u003e\n ------------------------------1e838f8f632a\n Content-Disposition: form-data; name\u003d\"data\"\n Content-Type: application/json; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n [\"foo\",\"bar\"]\n ------------------------------1e838f8f632a--\n ```\n " + }, + "example-3": { + "summary": "POST `/task/aTaskId/variables/aVarName/data` (3)", + "description": "Post a text file.", + "value": "\n ```\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"data\"; filename\u003d\"myFile.txt\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: binary\n\n \u003c\u003cByte Stream ommitted\u003e\u003e\n ---OSQH1f8lzs83iXFHphqfIuitaQfNKFY74Y\n Content-Disposition: form-data; name\u003d\"valueType\"\n Content-Type: text/plain; charset\u003dUS-ASCII\n Content-Transfer-Encoding: 8bit\n\n File\n ------------------------------1e838f8f632a--\n ```\n " + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The variable value or type is invalid, for example if no filename is set. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable name is `null`, or the Task id is `null` or does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/telemetry/configuration": { + "get": { + "operationId": "getTelemetryConfiguration", + "tags": [ + "Telemetry" + ], + "summary": "Fetch Telemetry Configuration", + "description": "Fetches Telemetry Configuration.", + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TelemetryConfigurationDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": { + "enableTelemetry": true + } + } + } + } + }, + "description": "Request successful." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the user who perform the operation is not a \u003cb\u003ecamunda-admin\u003c/b\u003e user." + } + } + }, + "post": { + "deprecated": true, + "operationId": "configureTelemetry", + "tags": [ + "Telemetry" + ], + "summary": "Configure Telemetry", + "description": "Deprecated: The sending telemetry feature is removed. Please remove the endpoint usages as they are no longer needed.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TelemetryConfigurationDto" + }, + "examples": { + "examle-1": { + "summary": "POST /telemetry/configuration", + "description": "The content of the Request Body", + "value": { + "enableTelemetry": true + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the user who perform the operation is not a \u003cb\u003ecamunda-admin\u003c/b\u003e user." + } + } + } + }, + "/telemetry/data": { + "get": { + "deprecated": true, + "operationId": "getTelemetryData", + "tags": [ + "Telemetry" + ], + "summary": "Fetch Telemetry Data", + "description": "Deprecated: Always returns false. The sending telemetry feature is removed. Please remove the endpoint usages as they are no longer needed.", + "parameters": [], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TelemetryDataDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": { + "installation": "8343cc7a-8ad1-42d4-97d2-43452c0bdfa3", + "product": { + "name": "Camunda BPM Runtime", + "version": "7.14.0", + "edition": "enterprise", + "internals": { + "database": { + "vendor": "h2", + "version": "1.4.190 (2015-10-11)" + }, + "application-server": { + "vendor": "Wildfly", + "version": "WildFly Full 19.0.0.Final (WildFly Core 11.0.0.Final) - 2.0.30.Final" + }, + "jdk": { + "version": "14.0.2", + "vendor": "Oracle Corporation" + }, + "commands": { + "StartProcessInstanceCmd": { + "count": 40 + }, + "FetchExternalTasksCmd": { + "count": 100 + } + }, + "metrics": { + "process-instances": { + "count": 936 + }, + "flow-node-instances": { + "count": 6125 + }, + "decision-instances": { + "count": 140 + }, + "executed-decision-elements": { + "count": 732 + } + }, + "data-collection-start-date": "2022-11-320T15:53:20.386+0100", + "camunda-integration": [ + "spring-boot-starter", + "camunda-bpm-run" + ], + "license-key": { + "customer": "customer name", + "type": "UNIFIED", + "valid-until": "2022-09-30", + "unlimited": false, + "features": { + "camundaBPM": "true" + }, + "raw": "customer\u003dcustomer name;expiryDate\u003d2022-09-30;camundaBPM\u003dtrue;optimize\u003dfalse;cawemo\u003dfalse" + }, + "webapps": [ + "cockpit", + "admin" + ] + } + } + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/tenant": { + "get": { + "operationId": "queryTenants", + "tags": [ + "Tenant" + ], + "summary": "Get Tenants", + "description": "Query for a list of tenants using a list of parameters. The size of the result set\ncan be retrieved by using the [Get Tenant\nCount](https://docs.camunda.org/manual/7.22/reference/rest/tenant/get-query-count/) method.", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "id", + "name" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the tenant." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the tenant." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "userMember", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only tenants where the given user is a member of." + }, + { + "name": "groupMember", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only tenants where the given group is a member of." + }, + { + "name": "includingGroupsOfUser", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Select only tenants where the user or one of his groups is a member of.\nCan only be used in combination with the `userMember` parameter. Value may only be `true`,\nas `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantDto" + } + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/tenant?name\u003dtenantOne`", + "value": [ + { + "id": "tenantOne", + "name": "Tenant One" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy` is specified. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableTenantResourceOperations", + "tags": [ + "Tenant" + ], + "summary": "Tenant Resource Options", + "description": "The `/tenant` resource supports two custom OPTIONS requests, this one for the resource\nas such and one for individual tenant instances. The OPTIONS request\nallows checking for the set of available operations that the currently\nauthenticated user can perform on the `/tenant` resource. If the user\ncan perform an operation or not may depend on various things,\nincluding the users authorizations to interact with this resource and\nthe internal configuration of the process engine.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/tenant", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/tenant/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/tenant/create", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/tenant/count": { + "get": { + "operationId": "getTenantCount", + "tags": [ + "Tenant" + ], + "summary": "Get Tenant Count", + "description": "Query for tenants using a list of parameters and retrieves the count.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the id of the tenant." + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name of the tenant." + }, + { + "name": "nameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the name that the parameter is a substring of." + }, + { + "name": "userMember", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only tenants where the given user is a member of." + }, + { + "name": "groupMember", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Select only tenants where the given group is a member of." + }, + { + "name": "includingGroupsOfUser", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Select only tenants where the user or one of his groups is a member of.\nCan only be used in combination with the `userMember` parameter. Value may only be `true`,\nas `false` is the default behavior." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/tenant/count?name\u003dtenantOne`", + "value": { + "count": 1 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/tenant/create": { + "post": { + "operationId": "createTenant", + "tags": [ + "Tenant" + ], + "summary": "Create Tenant", + "description": "Create a new tenant.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantDto" + }, + "examples": { + "example-1": { + "summary": "POST `/tenant/create`", + "value": { + "id": "tenantOne", + "name": "Tenant One" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The tenant could not be created due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/tenant/{id}": { + "delete": { + "operationId": "deleteTenant", + "tags": [ + "Tenant" + ], + "summary": "Delete Tenant", + "description": "Deletes a tenant by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Tenant cannot be found. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "get": { + "operationId": "getTenant", + "tags": [ + "Tenant" + ], + "summary": "Get Tenant", + "description": "Retrieves a tenant.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant to be retrieved." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/tenant/tenantOne`", + "value": { + "id": "tenantOne", + "name": "Tenant One" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Tenant with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableTenantInstanceOperations", + "tags": [ + "Tenant" + ], + "summary": "Tenant Resource Options", + "description": "The `/tenant` resource supports two custom OPTIONS requests, one for the resource as such and this one for\nindividual tenant instances. The OPTIONS request allows checking for the set of available operations that\nthe currently authenticated user can perform on the `/tenant/{id}` resource. If the user can perform an\noperation or not may depend on various things, including the users authorizations to interact with this\nresource and the internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant/tenantOne`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne", + "rel": "self" + }, + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne", + "rel": "update" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + }, + "put": { + "operationId": "updateTenant", + "tags": [ + "Tenant" + ], + "summary": "Update Tenant", + "description": "Updates a given tenant.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/tenant/tenantOne`", + "value": { + "id": "tenantOne", + "name": "Tenant One" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the tenant with the requested Id cannot be found." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The tenant could not be updated due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/tenant/{id}/group-members": { + "options": { + "operationId": "availableTenantGroupMembersOperations", + "tags": [ + "Tenant" + ], + "summary": "Tenant Group Membership Resource Options", + "description": "The OPTIONS request allows checking for the set of available operations that the\ncurrently authenticated user can perform on the resource. If the user\ncan perform an operation or not may depend on various things,\nincluding the users authorizations to interact with this resource and\nthe internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant/tenantOne/group-members`", + "value": { + "links": [ + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/group-members", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/group-members", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/tenant/{id}/group-members/{groupId}": { + "delete": { + "operationId": "deleteGroupMembership", + "tags": [ + "Tenant" + ], + "summary": "Create Tenant Group Membership", + "description": "Creates a membership between a tenant and a group.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant." + }, + { + "name": "groupId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an internal error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "createGroupMembership", + "tags": [ + "Tenant" + ], + "summary": "Create Tenant Group Membership", + "description": "Creates a membership between a tenant and a group.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant." + }, + { + "name": "groupId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the group." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an internal error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/tenant/{id}/user-members": { + "options": { + "operationId": "availableTenantUserMembersOperations", + "tags": [ + "Tenant" + ], + "summary": "Tenant User Membership Resource Options", + "description": "The OPTIONS request allows checking for the set of available operations that the\ncurrently authenticated user can perform on the resource. If the user\ncan perform an operation or not may depend on various things,\nincluding the users authorizations to interact with this resource and\nthe internal configuration of the process engine.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "OPTIONS `/tenant/tenantOne/user-members`", + "value": { + "links": [ + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/user-members", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/tenant/tenantOne/user-members", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/tenant/{id}/user-members/{userId}": { + "delete": { + "operationId": "deleteUserMembership", + "tags": [ + "Tenant" + ], + "summary": "Delete a Tenant User Membership", + "description": "Deletes a membership between a tenant and an user.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant." + }, + { + "name": "userId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "createUserMembership", + "tags": [ + "Tenant" + ], + "summary": "Create Tenant User Membership", + "description": "Creates a membership between a tenant and an user.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the tenant." + }, + { + "name": "userId", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user." + } + ], + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "In case an internal error occurs. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/user": { + "get": { + "operationId": "getUsers", + "tags": [ + "User" + ], + "summary": "Get List", + "description": "Query for a list of users using a list of parameters.\nThe size of the result set can be retrieved by using the Get User Count method.\n[Get User Count](https://docs.camunda.org/manual/7.22/reference/rest/user/get-query-count/) method.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by user id" + }, + { + "name": "idIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of user ids." + }, + { + "name": "firstName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the first name of the user. Exact match." + }, + { + "name": "firstNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the first name that the parameter is a substring of." + }, + { + "name": "lastName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the last name of the user. Exact match." + }, + { + "name": "lastNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the last name that the parameter is a substring of." + }, + { + "name": "email", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the email of the user. Exact match." + }, + { + "name": "emailLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the email that the parameter is a substring of." + }, + { + "name": "memberOfGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter for users which are members of the given group." + }, + { + "name": "memberOfTenant", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter for users which are members of the given tenant." + }, + { + "name": "potentialStarter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select Users that are potential starter for the given process definition." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "userId", + "firstName", + "lastName", + "email" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserProfileDto" + } + }, + "examples": { + "example-1": { + "summary": "GET `/user?firstName\u003dJohn`", + "value": [ + { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "anEmailAddress" + }, + { + "id": "jonny2", + "firstName": "John", + "lastName": "Smoe", + "email": "anotherEmailAddress" + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied,\nbut no `sortBy`, or if an invalid operator for variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableOperations", + "tags": [ + "User" + ], + "summary": "Options", + "description": "The `/user` resource supports two custom `OPTIONS` requests, one for the resource as such\nand one for individual user instances. The `OPTIONS` request allows checking for the set of\navailable operations that the currently authenticated user can perform on the /user resource.\nIf the user can perform an operation or not may depend on various things, including the user\u0027s\nauthorizations to interact with this resource and the internal configuration of the process\nengine. `OPTIONS /user` returns available interactions on the resource.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "GET `/user`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/user", + "rel": "list" + }, + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/user/count", + "rel": "count" + }, + { + "method": "POST", + "href": "http://localhost:8080/engine-rest/user/create", + "rel": "create" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/user/count": { + "get": { + "operationId": "getUserCount", + "tags": [ + "User" + ], + "summary": "Get List Count", + "description": "Queries for the number of deployments that fulfill given parameters. Takes the same parameters as the\n[Get Users](https://docs.camunda.org/manual/7.22/reference/rest/user/get-query/) method.", + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by user id" + }, + { + "name": "idIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by a comma-separated list of user ids." + }, + { + "name": "firstName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the first name of the user. Exact match." + }, + { + "name": "firstNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the first name that the parameter is a substring of." + }, + { + "name": "lastName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the last name of the user. Exact match." + }, + { + "name": "lastNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the last name that the parameter is a substring of." + }, + { + "name": "email", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the email of the user. Exact match." + }, + { + "name": "emailLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the email that the parameter is a substring of." + }, + { + "name": "memberOfGroup", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter for users which are members of the given group." + }, + { + "name": "memberOfTenant", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter for users which are members of the given tenant." + }, + { + "name": "potentialStarter", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only select Users that are potential starter for the given process definition." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "summary": "GET `/user/count?firstName\u003dJohn`", + "value": { + "count": 2 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example, if an invalid operator for variable\ncomparison is used. See the [Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/user/create": { + "post": { + "operationId": "createUser", + "tags": [ + "User" + ], + "summary": "Create", + "description": "Create a new user.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDto" + }, + "examples": { + "example-1": { + "summary": "POST /user/create", + "value": { + "profile": { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "anEmailAddress" + }, + "credentials": { + "password": "s3cret" + } + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful." + } + } + } + }, + "/user/{id}": { + "delete": { + "operationId": "deleteUser", + "tags": [ + "User" + ], + "summary": "Delete", + "description": "Deletes a user by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to be deleted." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "A Deployment with the provided id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "options": { + "operationId": "availableUserOperations", + "tags": [ + "User" + ], + "summary": "Options", + "description": "The `/user` resource supports two custom `OPTIONS` requests, one for the resource as such\nand one for individual user instances. The `OPTIONS` request allows checking for the set of\navailable operations that the currently authenticated user can perform on the /user resource.\nIf the user can perform an operation or not may depend on various things, including the user\u0027s\nauthorizations to interact with this resource and the internal configuration of the process\nengine. `OPTIONS /user/{id}` returns available interactions on a resource instance.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to be deleted." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceOptionsDto" + }, + "examples": { + "example-1": { + "summary": "GET `/user/peter`", + "value": { + "links": [ + { + "method": "GET", + "href": "http://localhost:8080/engine-rest/user/peter/profile", + "rel": "self" + }, + { + "method": "DELETE", + "href": "http://localhost:8080/engine-rest/user/peter", + "rel": "delete" + }, + { + "method": "PUT", + "href": "http://localhost:8080/engine-rest/user/peter/profile", + "rel": "update" + } + ] + } + } + } + } + }, + "description": "Request successful." + } + } + } + }, + "/user/{id}/credentials": { + "put": { + "operationId": "updateCredentials", + "tags": [ + "User" + ], + "summary": "Update Credentials", + "description": "Updates a user\u0027s credentials (password)", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to be updated." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserCredentialsDto" + }, + "examples": { + "example-1": { + "summary": "PUT /user/jonny1/credentials", + "value": { + "password": "s3cr3t", + "authenticatedUserPassword": "demo" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The authenticated user password does not match" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the corresponding user cannot be found" + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The user could not be updated due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/user/{id}/profile": { + "get": { + "operationId": "getUserProfile", + "tags": [ + "User" + ], + "summary": "Get Profile", + "description": "Retrieves a user\u0027s profile.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to retrieve." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserProfileDto" + }, + "examples": { + "example-1": { + "summary": "GET `/user/jonny1/profile", + "value": { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "anEmailAddress" + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Execution with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "put": { + "operationId": "updateProfile", + "tags": [ + "User" + ], + "summary": "Update User Profile", + "description": "Updates the profile information of an already existing user.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserProfileDto" + }, + "examples": { + "example-1": { + "summary": "PUT `/user/jonny1/profile`", + "value": { + "id": "jonny1", + "firstName": "John", + "lastName": "Doe", + "email": "aNewEmailAddress" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "Request successful. This method returns no content." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Identity service is read-only (Cannot modify users / groups / memberships)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "If the user with the requested Id cannot be found." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "The user could not be updated due to an internal server error. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/user/{id}/unlock": { + "post": { + "operationId": "unlockUser", + "tags": [ + "User" + ], + "summary": "Unlock User", + "description": "Unlocks a user by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the user to be unlocked." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "403": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "The user who performed the operation is not a Camunda admin user." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "User cannot be found. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/variable-instance": { + "get": { + "operationId": "getVariableInstances", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instances", + "description": "Query for variable instances that fulfill given parameters. Parameters may be the\nproperties of variable instances, such as the name or type. The size\nof the result set can be retrieved by using the [Get Variable Instance\nCount](https://docs.camunda.org/manual/7.22/reference/rest/variable-instance/get-query-count/)\nmethod.", + "parameters": [ + { + "name": "variableName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable instance name." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the variable instance name. The parameter can include the wildcard `%` to\nexpress like-strategy such as: starts with (`%`name), ends with (name`%`) or\ncontains (`%`name`%`)." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nprocess instance ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nexecution ids." + }, + { + "name": "caseInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated case instance ids." + }, + { + "name": "caseExecutionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated case execution ids." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated task\nids." + }, + { + "name": "batchIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nbatch ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nactivity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\ntenant ids." + }, + { + "name": "variableValues", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances that have the certain values.\nValue filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` -\ngreater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or\nequal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in `variableValues` case-insensitively. If set to `true`\n**variableName** and **variablename** are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in `variableValues` case-insensitively. If set to\n`true` **variableValue** and **variablevalue** are treated as equal." + }, + { + "name": "variableScopeIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of passed scope ids." + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "enum": [ + "variableName", + "variableType", + "activityInstanceId", + "tenantId" + ], + "type": "string" + }, + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "description": "Sort the results in a given order. Values may be asc for ascending order or desc for descending order.\nMust be used in conjunction with the sortBy parameter." + }, + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableInstanceDto" + } + }, + "examples": { + "example-1": { + "description": "GET `/variable-instance?processInstanceIdIn\u003daProcessInstanceId,anotherProcessInstanceId\u0026variableValues\u003damount_gteq_5,amount_lteq_200`", + "value": [ + { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "b68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "errorMessage": null, + "tenantId": null + }, + { + "id": "someOtherId", + "name": "amount", + "type": "Integer", + "value": 15, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "errorMessage": null, + "tenantId": null + }, + { + "id": "yetAnotherId", + "name": "amount", + "type": "Integer", + "value": 150, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "anotherProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_2:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "errorMessage": null, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryVariableInstances", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instances (POST)", + "description": "Query for variable instances that fulfill given parameters through a JSON object.\nThis method is slightly more powerful than the\n[Get Variable Instances](https://docs.camunda.org/manual/7.22/reference/rest/variable-\ninstance/get-query/) method because it allows filtering by multiple\nvariable instances of types `String`, `Number` or `Boolean`.", + "parameters": [ + { + "name": "firstResult", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the index of the first result to return." + }, + { + "name": "maxResults", + "in": "query", + "schema": { + "type": "integer" + }, + "description": "Pagination of results. Specifies the maximum number of results to return.\nWill return less results if there are no more results left." + }, + { + "name": "deserializeValues", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that\nstore custom Java objects) should be deserialized on server side (default\n`true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side\nand transformed to JSON using\n[Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property\nintrospection feature. Note that this requires the Java classes of the\nvariable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized\nformat. For example, a variable that is serialized as XML will be returned as\na JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward\ncompatibility, we recommend setting this parameter to `false` when developing\nweb applications that are independent of the Java process applications\ndeployed to the engine." + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/variable-instance`", + "value": { + "variableValues": [ + { + "name": "amount", + "operator": "gteq", + "value": 5 + }, + { + "name": "amount", + "operator": "lteq", + "value": 200 + } + ], + "processInstanceIdIn": [ + "aProcessInstanceId", + "anotherProcessInstanceId" + ], + "sorting": [ + { + "sortBy": "variableType", + "sortOrder": "asc" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VariableInstanceDto" + } + }, + "examples": { + "example-1": { + "description": "POST `/variable-instance`", + "value": [ + { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "b68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "errorMessage": null, + "tenantId": null + }, + { + "id": "someOtherId", + "name": "amount", + "type": "Integer", + "value": 15, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "errorMessage": null, + "tenantId": null + }, + { + "id": "yetAnotherId", + "name": "amount", + "type": "Integer", + "value": 150, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "anotherProcessInstanceId", + "executionId": "68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_2:b68b71ca-e310-11e2-beb0-f0def1557726", + "errorMessage": null, + "tenantId": null + } + ] + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\nparameter is supplied, but no `sortBy`, or if an invalid operator\nfor variable comparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/variable-instance/count": { + "get": { + "operationId": "getVariableInstancesCount", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instance Count", + "description": "Query for the number of variable instances that fulfill given parameters. Takes the\nsame parameters as the [Get Variable\nInstances](https://docs.camunda.org/manual/7.22/reference/rest/variable-instance/get-query/)\nmethod.", + "parameters": [ + { + "name": "variableName", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by variable instance name." + }, + { + "name": "variableNameLike", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Filter by the variable instance name. The parameter can include the wildcard `%` to\nexpress like-strategy such as: starts with (`%`name), ends with (name`%`) or\ncontains (`%`name`%`)." + }, + { + "name": "processInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nprocess instance ids." + }, + { + "name": "executionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nexecution ids." + }, + { + "name": "caseInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated case instance ids." + }, + { + "name": "caseExecutionIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated case execution ids." + }, + { + "name": "taskIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated task\nids." + }, + { + "name": "batchIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nbatch ids." + }, + { + "name": "activityInstanceIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\nactivity instance ids." + }, + { + "name": "tenantIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed and comma-separated\ntenant ids." + }, + { + "name": "variableValues", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances that have the certain values.\nValue filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n\n**Note:** Values are always treated as `String` objects on server side.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` -\ngreater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or\nequal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + { + "name": "variableNamesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable names provided in `variableValues` case-insensitively. If set to `true`\n**variableName** and **variablename** are treated as equal." + }, + { + "name": "variableValuesIgnoreCase", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Match all variable values provided in `variableValues` case-insensitively. If set to\n`true` **variableValue** and **variablevalue** are treated as equal." + }, + { + "name": "variableScopeIdIn", + "in": "query", + "schema": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of passed scope ids." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "GET `/variable-instance/count?processInstanceIdIn\u003daProcessInstanceId,anotherProcessInstanceId\u0026variableValues\u003damount_gteq_5,amount_lteq_200`", + "value": { + "count": 3 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if an invalid operator for variable\ncomparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + }, + "post": { + "operationId": "queryVariableInstancesCount", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instance Count (POST)", + "description": "Query for the number of variable instances that fulfill given parameters. This\nmethod takes the same message body as the\n[Get Variable Instances POST](https://docs.camunda.org/manual/7.22/reference/rest/variable-\ninstance/post-query/) method and therefore it is slightly more\npowerful than the [Get Variable Instance\nCount](https://docs.camunda.org/manual/7.22/reference/rest/variable-instance/get-query-count/)\nmethod.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableInstanceQueryDto" + }, + "examples": { + "example-1": { + "summary": "POST `/variable-instance/count`", + "value": { + "variableValues": [ + { + "name": "amount", + "operator": "gteq", + "value": "5" + }, + { + "name": "amount", + "operator": "lteq", + "value": 200 + } + ], + "processInstanceIdIn": [ + "aProcessInstanceId", + "anotherProcessInstanceId" + ] + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountResultDto" + }, + "examples": { + "example-1": { + "description": "POST `/variable-instance/count`", + "value": { + "count": 3 + } + } + } + } + }, + "description": "Request successful." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Returned if some of the query parameters are invalid, for example if an invalid operator for variable\ncomparison is used. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/variable-instance/{id}": { + "get": { + "operationId": "getVariableInstance", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instance", + "description": "Retrieves a variable by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the variable instance." + }, + { + "name": "deserializeValue", + "in": "query", + "schema": { + "type": "boolean" + }, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on server side (default `true`).\n\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature.\nNote that this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format.\nFor example, a variable that is serialized as XML will be returned as a JSON string containing XML.\n\n**Note:** While `true` is the default value for reasons of backward compatibility, we recommend setting this\nparameter to `false` when developing web applications that are independent of the Java process\napplications deployed to the engine." + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VariableInstanceDto" + }, + "examples": { + "example-1": { + "summary": "Status 200.", + "description": "GET `/variable-instance/someId`", + "value": { + "id": "someId", + "name": "amount", + "type": "Integer", + "value": 5, + "processDefinitionId": "aProcessDefinitionId", + "processInstanceId": "aProcessInstanceId", + "executionId": "b68b71c9-e310-11e2-beb0-f0def1557726", + "taskId": null, + "batchId": null, + "activityInstanceId": "Task_1:b68b71ca-e310-11e2-beb0-f0def1557726", + "caseExecutionId": null, + "caseInstanceId": null, + "tenantId": null, + "errorMessage": null + } + } + } + } + }, + "description": "Request successful." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/variable-instance/{id}/data": { + "get": { + "operationId": "getVariableInstanceBinary", + "tags": [ + "Variable Instance" + ], + "summary": "Get Variable Instance (Binary)", + "description": "Retrieves the content of a variable by id. Applicable for byte array and file\nvariables.", + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": "The id of the variable instance." + } + ], + "responses": { + "200": { + "description": "Request successful. For binary variables or files without any MIME type information, a byte stream is returned.\n File variables with MIME type information are returned as the saved type. Additionally, for file\n variables the Content-Disposition header will be set.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary", + "description": "For files without any MIME type information, a byte stream is returned." + } + }, + "*/*": { + "schema": { + "type": "string", + "format": "binary", + "description": "Files with MIME type information are returned as the saved type. Additionally, for file\n responses, the Content-Disposition header will be set." + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id exists but does not serialize as binary data. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExceptionDto" + } + } + }, + "description": "Variable with given id does not exist. See the\n[Introduction](https://docs.camunda.org/manual/7.22/reference/rest/overview/#error-handling)\nfor the error response format." + } + } + } + }, + "/version": { + "get": { + "operationId": "getRestAPIVersion", + "tags": [ + "Version" + ], + "summary": "Get Rest API version", + "description": "Retrieves the version of the Rest API.", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionDto" + }, + "examples": { + "example-1": { + "summary": "Status 200 Response", + "description": "The Response content of a status 200", + "value": { + "version": "7.13.0" + } + } + } + } + }, + "description": "Request successful." + } + } + } + } + }, + "security": [ + { + "basicAuth": [] + } + ], + "components": { + "securitySchemes": { + "basicAuth": { + "type": "http", + "scheme": "basic" + } + }, + "schemas": { + "AbstractSetRemovalTimeDto": { + "type": "object", + "properties": { + "absoluteRemovalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date for which the instances shall be removed. Value may not be `null`.\n\n**Note:** Cannot be set in conjunction with `clearedRemovalTime` or `calculatedRemovalTime`." + }, + "clearedRemovalTime": { + "type": "boolean", + "nullable": true, + "description": "Sets the removal time to `null`. Value may only be `true`, as `false` is the default behavior.\n\n**Note:** Cannot be set in conjunction with `absoluteRemovalTime` or `calculatedRemovalTime`." + }, + "calculatedRemovalTime": { + "type": "boolean", + "nullable": true, + "description": "The removal time is calculated based on the engine\u0027s configuration settings. Value may only be `true`, as `false` is the default behavior.\n\n**Note:** Cannot be set in conjunction with `absoluteRemovalTime` or `clearedRemovalTime`." + } + } + }, + "AbstractVendorVersionInformationDto": { + "type": "object", + "properties": { + "vendor": { + "type": "string", + "nullable": true, + "description": "Information about the vendor." + }, + "version": { + "type": "string", + "nullable": true, + "description": "Information about the version." + } + } + }, + "ActivityInstanceDto": { + "type": "object", + "description": "A JSON object corresponding to the Activity Instance tree of the given process instance.", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance." + }, + "parentActivityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent activity instance, for example a sub process instance." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity." + }, + "activityName": { + "type": "string", + "nullable": true, + "description": "The name of the activity" + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the activity. This property is deprecated. Please use \u0027activityName\u0027." + }, + "activityType": { + "type": "string", + "nullable": true, + "description": "The type of activity (corresponds to the XML element name in the BPMN 2.0, e.g., \u0027userTask\u0027)" + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance this activity instance is part of." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition." + }, + "childActivityInstances": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ActivityInstanceDto" + }, + "description": "A list of child activity instances." + }, + "childTransitionInstances": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TransitionInstanceDto" + }, + "description": "A list of child transition instances.\nA transition instance represents an execution waiting in an asynchronous continuation." + }, + "executionIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of execution ids." + }, + "incidentIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of incident ids." + }, + "incidents": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ActivityInstanceIncidentDto" + }, + "description": "A list of JSON objects containing incident specific properties:\n* `id`: the id of the incident\n* `activityId`: the activity id in which the incident occurred" + } + } + }, + "ActivityInstanceIncidentDto": { + "type": "object", + "description": "An activity instance, incident pair.", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the incident." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The activity id in which the incident happened." + } + } + }, + "ActivityStatisticsResultDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the activity the results are aggregated for." + }, + "instances": { + "type": "integer", + "format": "int32", + "description": "The total number of running process instances of this activity." + }, + "failedJobs": { + "type": "integer", + "format": "int32", + "description": "The total number of failed jobs for the running instances.\n**Note**: Will be `0` (not `null`), if failed jobs were excluded." + }, + "incidents": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/IncidentStatisticsResultDto" + }, + "description": "Each item in the resulting array is an object which contains `incidentType` and `incidentCount`.\n**Note**: Will be an empty array, if `incidents` or `incidentsForType` were excluded.\nFurthermore, the array will be also empty if no incidents were found." + }, + "@class": { + "type": "string", + "nullable": true, + "description": "The fully qualified class name of the data transfer object class.\nThe class name might change in future releases." + } + } + }, + "AnnotationDto": { + "type": "object", + "properties": { + "annotation": { + "type": "string", + "nullable": true, + "description": "The annotation value to put." + } + } + }, + "AnyValue": { + "description": "Can be any value - string, number, boolean, array or object.\n **Note**: Not every endpoint supports every type." + }, + "AtomLink": { + "type": "object", + "properties": { + "rel": { + "type": "string", + "nullable": true, + "description": "The relation of the link to the object that belongs to." + }, + "href": { + "type": "string", + "nullable": true, + "description": "The url of the link." + }, + "method": { + "type": "string", + "nullable": true, + "description": "The http method." + } + } + }, + "AttachmentDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the task attachment." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the task attachment." + }, + "description": { + "type": "string", + "nullable": true, + "description": "The description of the task attachment." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task to which the attachment belongs." + }, + "type": { + "type": "string", + "nullable": true, + "description": "Indication of the type of content that this attachment refers to.\nCan be MIME type or any other indication." + }, + "url": { + "type": "string", + "nullable": true, + "description": "The url to the remote content of the task attachment." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the variable was inserted.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the attachment should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process containing the task." + } + } + }, + { + "$ref": "#/components/schemas/LinkableDto" + } + ] + }, + "AuthenticationResult": { + "type": "object", + "properties": { + "authenticatedUser": { + "type": "string", + "nullable": true, + "description": "An id of authenticated user." + }, + "authenticated": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating if user is authenticated." + }, + "tenants": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Will be null." + }, + "groups": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Will be null." + } + } + }, + "AuthorizationCheckResultDto": { + "type": "object", + "properties": { + "permissionName": { + "type": "string", + "nullable": true, + "description": "Name of the permission which was checked." + }, + "resourceName": { + "type": "string", + "nullable": true, + "description": "The name of the resource for which the permission check was performed." + }, + "resourceId": { + "type": "string", + "nullable": true, + "description": "The id of the resource for which the permission check was performed." + }, + "authorized": { + "type": "boolean", + "nullable": true, + "description": "Returns true or false depending on whether the user is authorized or not." + } + } + }, + "AuthorizationCreateDto": { + "type": "object", + "properties": { + "type": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The type of the authorization (0\u003dglobal, 1\u003dgrant, 2\u003drevoke). See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service.md#authorization-type)\nfor more information about authorization types." + }, + "permissions": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "An array of Strings holding the permissions provided by this authorization." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user this authorization has been created for. The value `*`\nrepresents a global authorization ranging over all users." + }, + "groupId": { + "type": "string", + "nullable": true, + "description": "The id of the group this authorization has been created for." + }, + "resourceType": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "An integer representing the resource type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + "resourceId": { + "type": "string", + "nullable": true, + "description": "The resource Id. The value `*` represents an authorization ranging over all\ninstances of a resource." + } + } + }, + "AuthorizationDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the authorization." + }, + "type": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The type of the authorization (0\u003dglobal, 1\u003dgrant, 2\u003drevoke). See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service.md#authorization-type)\nfor more information about authorization types." + }, + "permissions": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "An array of Strings holding the permissions provided by this authorization." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user this authorization has been created for. The value `*`\nrepresents a global authorization ranging over all users." + }, + "groupId": { + "type": "string", + "nullable": true, + "description": "The id of the group this authorization has been created for." + }, + "resourceType": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "An integer representing the resource type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + "resourceId": { + "type": "string", + "nullable": true, + "description": "The resource Id. The value `*` represents an authorization ranging over all\ninstances of a resource." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The removal time indicates the date a historic instance\nauthorization is cleaned up. A removal time can only be assigned to a historic\ninstance authorization. Can be `null` when not related to a historic instance\nresource or when the removal time strategy is end and the root process instance\nis not finished. Default format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance the historic\ninstance authorization is related to. Can be `null` if not related to a historic instance\nresource." + } + } + }, + "AuthorizationExceptionDto": { + "allOf": [ + { + "type": "object", + "properties": { + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user that does not have expected permissions" + }, + "missingAuthorizations": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/MissingAuthorizationDto" + }, + "description": "" + } + } + }, + { + "$ref": "#/components/schemas/ExceptionDto" + } + ] + }, + "AuthorizationUpdateDto": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "An array of Strings holding the permissions provided by this authorization." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user this authorization has been created for. The value `*`\nrepresents a global authorization ranging over all users." + }, + "groupId": { + "type": "string", + "nullable": true, + "description": "The id of the group this authorization has been created for." + }, + "resourceType": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "An integer representing the resource type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/authorization-service/#resources)\nfor a list of integer representations of resource types." + }, + "resourceId": { + "type": "string", + "nullable": true, + "description": "The resource Id. The value `*` represents an authorization ranging over all\ninstances of a resource." + } + } + }, + "BasicUserCredentialsDto": { + "type": "object", + "properties": { + "username": { + "type": "string", + "nullable": true, + "description": "The username of a user." + }, + "password": { + "type": "string", + "nullable": true, + "description": "A password of a user." + } + } + }, + "BatchDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the batch." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of the batch.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + "totalJobs": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The total jobs of a batch is the number of batch execution jobs required to complete the batch." + }, + "jobsCreated": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of batch execution jobs already created by the seed job." + }, + "batchJobsPerSeed": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of batch execution jobs created per seed job invocation.\nThe batch seed job is invoked until it has created all batch execution jobs required by the batch\n(see `totalJobs` property)." + }, + "invocationsPerBatchJob": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Every batch execution job invokes the command executed by the batch `invocationsPerBatchJob` times.\nE.g., for a process instance migration batch this specifies the number of process instances which are migrated per batch execution job." + }, + "seedJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the seed jobs of this batch." + }, + "monitorJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the monitor jobs of this batch." + }, + "batchJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the batch execution jobs of this batch." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Indicates whether this batch is suspended or not." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the batch." + }, + "createUserId": { + "type": "string", + "nullable": true, + "description": "The id of the user that created the batch." + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the batch was started. Default format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`. For further information,\nplease see the [documentation] (https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "executionStartTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the batch execution was started, i.e., at least one batch job has been executed. Default\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`. For further information, please see the [documentation]\n(https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + } + } + }, + "BatchStatisticsDto": { + "allOf": [ + { + "type": "object", + "properties": { + "remainingJobs": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of remaining batch execution jobs. This does include failed batch execution jobs and\nbatch execution jobs which still have to be created by the seed job." + }, + "completedJobs": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of completed batch execution jobs. This does include aborted/deleted batch execution jobs." + }, + "failedJobs": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of failed batch execution jobs. This does not include aborted or deleted batch execution jobs." + } + } + }, + { + "$ref": "#/components/schemas/BatchDto" + } + ] + }, + "CalledProcessDefinitionDto": { + "allOf": [ + { + "type": "object", + "properties": { + "calledFromActivityIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Ids of the CallActivities which call this process." + }, + "callingProcessDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the calling process definition" + } + } + }, + { + "$ref": "#/components/schemas/ProcessDefinitionDto" + } + ] + }, + "CamundaFormRef": { + "type": "object", + "properties": { + "key": { + "type": "string", + "nullable": true, + "description": "The key of the Camunda Form." + }, + "binding": { + "type": "string", + "nullable": true, + "description": "The binding of the Camunda Form. Can be `latest`, `deployment` or `version`." + }, + "version": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The specific version of a Camunda Form. This property is only set if `binding` is `version`." + } + } + }, + "CaseDefinitionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the case definition" + }, + "key": { + "type": "string", + "nullable": true, + "description": "The key of the case definition, i.e., the id of the CMMN 2.0 XML case definition." + }, + "category": { + "type": "string", + "nullable": true, + "description": "The category of the case definition." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the case definition." + }, + "version": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the case definition that the engine assigned to it." + }, + "resource": { + "type": "string", + "nullable": true, + "description": "The file name of the case definition." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The deployment id of the case definition." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the case definition." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0, + "description": "History time to live value of the case definition.\nIs used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)." + } + } + }, + "CheckPasswordPolicyResultDto": { + "allOf": [ + { + "type": "object", + "properties": { + "valid": { + "type": "boolean", + "nullable": true, + "description": "`true` if the password is compliant with the policy, otherwise `false`." + } + } + }, + { + "$ref": "#/components/schemas/PasswordPolicyDto" + } + ] + }, + "CheckPasswordPolicyRuleDto": { + "allOf": [ + { + "type": "object", + "properties": { + "valid": { + "type": "boolean", + "nullable": true, + "description": "`true` if the password is compliant with this rule, otherwise `false`." + } + } + }, + { + "$ref": "#/components/schemas/PasswordPolicyRuleDto" + } + ] + }, + "CleanableHistoricBatchReportResultDto": { + "type": "object", + "properties": { + "batchType": { + "type": "string", + "nullable": true, + "description": "The type of the batch operation." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The history time to live of the batch operation." + }, + "finishedBatchesCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the finished batch operations." + }, + "cleanableBatchesCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the cleanable historic batch operations, referring to history time to\nlive." + } + } + }, + "CleanableHistoricDecisionInstanceReportResultDto": { + "type": "object", + "properties": { + "decisionDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the decision definition." + }, + "decisionDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the decision definition." + }, + "decisionDefinitionName": { + "type": "string", + "nullable": true, + "description": "The name of the decision definition." + }, + "decisionDefinitionVersion": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the decision definition." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The history time to live of the decision definition." + }, + "finishedDecisionInstanceCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the finished historic decision instances." + }, + "cleanableDecisionInstanceCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the cleanable historic decision instances, referring to history time\nto live." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the decision definition." + } + } + }, + "CleanableHistoricProcessInstanceReportResultDto": { + "type": "object", + "properties": { + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "The name of the process definition." + }, + "processDefinitionVersion": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the process definition." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The history time to live of the process definition." + }, + "finishedProcessInstanceCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the finished historic process instances." + }, + "cleanableProcessInstanceCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The count of the cleanable historic process instances, referring to history time to\nlive." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the process definition." + } + } + }, + "CommentDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the task comment." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user who created the comment." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task to which the comment belongs." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the comment is related to." + }, + "time": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when the comment was created.\n[Default format]($(docsUrl)/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "message": { + "type": "string", + "nullable": true, + "description": "The content of the comment." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the comment should be removed by the History Cleanup job.\n[Default format]($(docsUrl)/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining the task." + } + } + }, + { + "$ref": "#/components/schemas/LinkableDto" + } + ] + }, + "CompleteExternalTaskDto": { + "allOf": [ + { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object with the following properties:" + }, + "localVariables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing local variable key-value pairs. Local variables are set only in the scope of external task. Each key is a variable name and each value a JSON variable value object with the following properties:" + } + } + }, + { + "$ref": "#/components/schemas/HandleExternalTaskDto" + } + ] + }, + "CompleteTaskDto": { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs." + }, + "withVariablesInReturn": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Indicates whether the response should contain the process variables or not. The\ndefault is `false` with a response code of `204`. If set to `true` the response\ncontains the process variables and has a response code of `200`. If the task is not\nassociated with a process instance (e.g. if it\u0027s part of a case instance) no\nvariables will be returned." + } + } + }, + "ConditionQueryParameterDto": { + "type": "object", + "properties": { + "operator": { + "type": "string", + "nullable": true, + "enum": [ + "eq", + "neq", + "gt", + "gteq", + "lt", + "lteq", + "like", + "notLike" + ], + "description": "Comparison operator to be used. `notLike` is not supported by all endpoints." + }, + "value": { + "$ref": "#/components/schemas/AnyValue" + } + } + }, + "CorrelationMessageAsyncDto": { + "type": "object", + "properties": { + "messageName": { + "type": "string", + "nullable": true, + "description": "The name of the message to correlate. Corresponds to the \u0027name\u0027 element of the message defined in BPMN 2.0 XML. Can be null to correlate by other criteria only." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids that define a group of process instances\nto which the operation will correlate a message.\n\nPlease note that if `processInstanceIds`, `processInstanceQuery` and `historicProcessInstanceQuery`\nare defined, the resulting operation will be performed on the union of these sets." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "All variables the operation will set in the root scope of the process instances the message is correlated to." + } + } + }, + "CorrelationMessageDto": { + "type": "object", + "properties": { + "messageName": { + "type": "string", + "nullable": true, + "description": "The name of the message to deliver." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "Used for correlation of process instances that wait for incoming messages.\nWill only correlate to executions that belong to a process instance with the provided business key." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "Used to correlate the message for a tenant with the given id.\nWill only correlate to executions and process definitions which belong to the tenant.\nMust not be supplied in conjunction with a `withoutTenantId`." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A Boolean value that indicates whether the message should only be correlated to executions\nand process definitions which belong to no tenant or not. Value may only be `true`, as `false`\nis the default behavior.\nMust not be supplied in conjunction with a `tenantId`." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Used to correlate the message to the process instance with the given id." + }, + "correlationKeys": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "Used for correlation of process instances that wait for incoming messages.\nHas to be a JSON object containing key-value pairs that are matched against process instance variables\nduring correlation. Each key is a variable name and each value a JSON variable value object with the\nfollowing properties." + }, + "localCorrelationKeys": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "Local variables used for correlation of executions (process instances) that wait for incoming messages.\nHas to be a JSON object containing key-value pairs that are matched against local variables during correlation.\nEach key is a variable name and each value a JSON variable value object with the following properties." + }, + "processVariables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of variables that is injected into the triggered execution or process instance after the message\nhas been delivered. Each key is a variable name and each value a JSON variable value object with\nthe following properties." + }, + "processVariablesLocal": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of local variables that is injected into the execution waiting on the message.\nEach key is a variable name and each value a JSON variable value object\nwith the following properties." + }, + "processVariablesToTriggeredScope": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of variables that is injected into the new scope triggered by message correlation.\nEach key is a variable name and each value a JSON variable value object\nwith the following properties." + }, + "all": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A Boolean value that indicates whether the message should be correlated to exactly one entity or multiple entities.\nIf the value is set to `false`, the message will be correlated to exactly one entity (execution or process definition).\nIf the value is set to `true`, the message will be correlated to multiple executions and a process definition that\ncan be instantiated by this message in one go." + }, + "resultEnabled": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A Boolean value that indicates whether the result of the correlation should be returned or not.\nIf this property is set to `true`, there will be returned a list of message correlation result objects. Depending on the\nall property, there will be either one ore more returned results in the list.\n\nThe default value is `false`, which means no result will be returned." + }, + "variablesInResultEnabled": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A Boolean value that indicates whether the result of the correlation should contain process variables or not.\nThe parameter resultEnabled should be set to `true` in order to use this it.\n\nThe default value is `false`, which means the variables will not be returned." + } + } + }, + "CountResultDto": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int64", + "description": "The number of matching instances." + } + } + }, + "CreateFilterDto": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "nullable": true, + "description": "The resource type of the filter." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the filter." + }, + "owner": { + "type": "string", + "nullable": true, + "description": "The user id of the owner of the filter." + }, + "query": { + "type": "object", + "description": "The query of the filter as a JSON object." + }, + "properties": { + "type": "object", + "description": "The properties of a filter as a JSON object." + } + } + }, + "CreateIncidentDto": { + "type": "object", + "properties": { + "incidentType": { + "type": "string", + "nullable": true, + "description": "A type of the new incident." + }, + "configuration": { + "type": "string", + "nullable": true, + "description": "A configuration for the new incident." + }, + "message": { + "type": "string", + "nullable": true, + "description": "A message for the new incident." + } + } + }, + "DecisionDefinitionDiagramDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision definition." + }, + "dmnXml": { + "type": "string", + "nullable": true, + "description": "An escaped XML string containing the XML that this decision definition was deployed with.\nCarriage returns, line feeds and quotation marks are escaped." + } + } + }, + "DecisionDefinitionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision definition" + }, + "key": { + "type": "string", + "nullable": true, + "description": "The key of the decision definition, i.e., the id of the DMN 1.0 XML decision definition." + }, + "category": { + "type": "string", + "nullable": true, + "description": "The category of the decision definition." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the decision definition." + }, + "version": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the decision definition that the engine assigned to it." + }, + "resource": { + "type": "string", + "nullable": true, + "description": "The file name of the decision definition." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The deployment id of the decision definition." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the decision definition." + }, + "decisionRequirementsDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the decision requirements definition this decision definition belongs to." + }, + "decisionRequirementsDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the decision requirements definition this decision definition belongs to." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0, + "description": "History time to live value of the decision definition.\nIs used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)." + }, + "versionTag": { + "type": "string", + "nullable": true, + "description": "The version tag of the decision definition." + } + } + }, + "DecisionRequirementsDefinitionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision requirements definition." + }, + "key": { + "type": "string", + "nullable": true, + "description": "The key of the decision requirements definition." + }, + "category": { + "type": "string", + "nullable": true, + "description": "The category of the decision requirements definition." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the decision requirements definition." + }, + "version": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the decision requirements definition that the engine assigned to\nit." + }, + "resource": { + "type": "string", + "nullable": true, + "description": "The file name of the decision requirements definition." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The deployment id of the decision requirements definition." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the decision requirements definition." + } + } + }, + "DecisionRequirementsDefinitionXmlDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision requirements definition." + }, + "dmnXml": { + "type": "string", + "nullable": true, + "description": "An escaped XML string containing the XML that this decision requirements definition\nwas deployed with. Carriage returns, line feeds and quotation marks\nare escaped." + } + } + }, + "DeleteHistoricDecisionInstancesDto": { + "type": "object", + "properties": { + "historicDecisionInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of historic decision instance ids to delete." + }, + "historicDecisionInstanceQuery": { + "$ref": "#/components/schemas/HistoricDecisionInstanceQueryDto" + }, + "deleteReason": { + "type": "string", + "nullable": true, + "description": "A string with delete reason." + } + } + }, + "DeleteHistoricProcessInstancesDto": { + "type": "object", + "properties": { + "historicProcessInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list historic process instance ids to delete." + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "deleteReason": { + "type": "string", + "nullable": true, + "description": "A string with delete reason." + }, + "failIfNotExists": { + "type": "boolean", + "nullable": true, + "description": "If set to `false`, the request will still be successful if one ore more of the process ids are not found." + } + } + }, + "DeleteProcessInstancesDto": { + "type": "object", + "properties": { + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list process instance ids to delete." + }, + "deleteReason": { + "type": "string", + "nullable": true, + "description": "A string with delete reason." + }, + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "Skip execution listener invocation for activities that are started or ended as part of this request." + }, + "skipSubprocesses": { + "type": "boolean", + "nullable": true, + "description": "Skip deletion of the subprocesses related to deleted processes as part of this request." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "Skip execution of [input/output variable mappings](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#input-output-variable-mapping)\nfor activities that are started or ended as part of this request." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + } + } + }, + "DeploymentDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the deployment." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the deployment." + }, + "deploymentTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when the deployment was created." + }, + "source": { + "type": "string", + "nullable": true, + "description": "The source of the deployment." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the deployment." + } + } + }, + { + "$ref": "#/components/schemas/LinkableDto" + } + ] + }, + "DeploymentResourceDto": { + "title": "DeploymentResourceDto", + "type": "object", + "description": "A JSON object corresponding to the `Resource` interface in the engine.\nIts properties are as follows:", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the deployment resource." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the deployment resource" + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The id of the deployment." + } + } + }, + "DeploymentWithDefinitionsDto": { + "allOf": [ + { + "type": "object", + "properties": { + "deployedProcessDefinitions": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + }, + "description": "A JSON Object containing a property for each of the process definitions,\nwhich are successfully deployed with that deployment.\nThe key is the process definition id, the value is a JSON Object corresponding to the process definition." + }, + "deployedDecisionDefinitions": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/DecisionDefinitionDto" + }, + "description": "A JSON Object containing a property for each of the decision definitions,\nwhich are successfully deployed with that deployment.\nThe key is the decision definition id, the value is a JSON Object corresponding to the decision definition." + }, + "deployedDecisionRequirementsDefinitions": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/DecisionRequirementsDefinitionDto" + }, + "description": "A JSON Object containing a property for each of the decision requirements definitions,\nwhich are successfully deployed with that deployment.\nThe key is the decision requirements definition id, the value is a JSON Object corresponding to the decision requirements definition." + }, + "deployedCaseDefinitions": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/CaseDefinitionDto" + }, + "description": "A JSON Object containing a property for each of the case definitions,\nwhich are successfully deployed with that deployment.\nThe key is the case definition id, the value is a JSON Object corresponding to the case definition." + } + } + }, + { + "$ref": "#/components/schemas/DeploymentDto" + } + ] + }, + "DurationReportResultDto": { + "type": "object", + "properties": { + "period": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Specifies a timespan within a year.\n**Note:** The period must be interpreted in conjunction with the returned `periodUnit`." + }, + "periodUnit": { + "type": "string", + "nullable": true, + "enum": [ + "MONTH", + "QUARTER" + ], + "description": "The unit of the given period. Possible values are `MONTH` and `QUARTER`." + }, + "minimum": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The smallest duration in milliseconds of all completed process instances which were started in the given period." + }, + "maximum": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The greatest duration in milliseconds of all completed process instances which were started in the given period." + }, + "average": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The average duration in milliseconds of all completed process instances which were started in the given period." + } + } + }, + "EvaluateDecisionDto": { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "" + } + } + }, + "EvaluationConditionDto": { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of variables which are used for evaluation of the conditions and are injected into the process instances which have been triggered.\nEach key is a variable name and each value a JSON variable value object with the following properties." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "Used for the process instances that have been triggered after the evaluation." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "Used to evaluate a condition for a tenant with the given id.\nWill only evaluate conditions of process definitions which belong to the tenant." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "A Boolean value that indicates whether the conditions should only be evaluated of process definitions which belong to no tenant or not.\nValue may only be true, as false is the default behavior." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Used to evaluate conditions of the process definition with the given id." + } + } + }, + "EventSubscriptionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the event subscription." + }, + "eventType": { + "type": "string", + "nullable": true, + "description": "The type of the event subscription." + }, + "eventName": { + "type": "string", + "nullable": true, + "description": "The name of the event this subscription belongs to as defined in the process model." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution that is subscribed on the referenced event." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance this subscription belongs to." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The identifier of the activity that this event subscription belongs to.\nThis could for example be the id of a receive task." + }, + "createdDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time this event subscription was created." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant this event subscription belongs to.\nCan be `null` if the subscription belongs to no single tenant." + } + } + }, + "EventSubscriptionQueryDto": { + "type": "object", + "description": "A event subscription query which retrieves a list of event subscriptions", + "properties": { + "eventSubscriptionId": { + "type": "string", + "nullable": true, + "description": "The id of the event subscription." + }, + "eventName": { + "type": "string", + "nullable": true, + "description": "The name of the event this subscription belongs to as defined in the process model." + }, + "eventType": { + "type": "string", + "nullable": true, + "enum": [ + "message", + "signal", + "compensate", + "conditional" + ], + "description": "The type of the event subscription." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution that is subscribed on the referenced event." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance this subscription belongs to." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The identifier of the activity that this event subscription belongs to.\nThis could for example be the id of a receive task." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nOnly select subscriptions that belong to one of the given tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only select subscriptions which have no tenant id.\nValue may only be `true`, as `false` is the default behavior." + }, + "includeEventSubscriptionsWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Select event subscriptions which have no tenant id.\nCan be used in combination with tenantIdIn parameter.\nValue may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "created", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "ExceptionDto": { + "title": "ExceptionDto", + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true, + "description": "An exception class indicating the occurred error." + }, + "message": { + "type": "string", + "nullable": true, + "description": "A detailed message of the error." + }, + "code": { + "type": "number", + "description": "The code allows your client application to identify the error in an automated fashion.\nYou can look up the meaning of all built-in codes and learn how to add custom codes\nin the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/error-handling/#exception-codes)." + } + } + }, + "ExecutionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the Execution." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the root of the execution tree representing the process instance." + }, + "ended": { + "type": "boolean", + "nullable": true, + "description": "Indicates if the execution is ended." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant this execution belongs to. Can be `null`\nif the execution belongs to no single tenant." + } + } + }, + "ExecutionQueryDto": { + "type": "object", + "description": "A Execution instance query which defines a list of Execution instances", + "properties": { + "businessKey": { + "type": "string", + "nullable": true, + "description": "Filter by the business key of the process instances the executions belong to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the process definition the executions run on." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the process definition the executions run on." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the process instance the execution belongs to." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the activity the execution currently executes." + }, + "signalEventSubscriptionName": { + "type": "string", + "nullable": true, + "description": "Select only those executions that expect a signal of the given name." + }, + "messageEventSubscriptionName": { + "type": "string", + "nullable": true, + "description": "Select only those executions that expect a message of the given name." + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Only include active executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Only include suspended executions. Value may only be `true`, as `false` is the default\nbehavior." + }, + "incidentId": { + "type": "string", + "nullable": true, + "description": "Filter by the incident id." + }, + "incidentType": { + "type": "string", + "nullable": true, + "description": "Filter by the incident type. See the [User Guide](/manual/develop/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + "incidentMessage": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message. Exact match." + }, + "incidentMessageLike": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message that the parameter is a substring of." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. An execution must have one of the given\ntenant ids." + }, + "variables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "An array to only include executions that have variables with certain values.\n\nThe array consists of objects with the three properties `name`, `operator`\nand `value`.\n`name (String)` is the variable name, `operator (String)` is the comparison\noperator to be used and `value` the variable value.\n`value` may be `String`, `Number` or `Boolean`.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` -\ngreater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or\nequal to;\n`like`." + }, + "processVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "An array to only include executions that belong to a process instance with variables\nwith certain values.\n\nThe array consists of objects with the three properties `name`, `operator`\nand `value`.\n`name (String)` is the variable name, `operator (String)` is the comparison\noperator to be used and `value` the variable value.\n`value` may be `String`, `Number` or `Boolean`.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to." + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable names provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable values provided in `variables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Has no effect for the `/count` endpoint", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "instanceId", + "definitionKey", + "definitionId", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "ExecutionTriggerDto": { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs. Each key is a variable name and\neach value a JSON variable value object." + } + } + }, + "ExtendLockOnExternalTaskDto": { + "allOf": [ + { + "type": "object", + "properties": { + "newDuration": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "An amount of time (in milliseconds). This is the new lock duration starting from the\ncurrent moment." + } + } + }, + { + "$ref": "#/components/schemas/HandleExternalTaskDto" + } + ] + }, + "ExternalTaskBpmnError": { + "allOf": [ + { + "type": "object", + "properties": { + "workerId": { + "type": "string", + "nullable": true, + "description": "The id of the worker that reports the failure. Must match the id of the worker who has most recently\nlocked the task." + } + } + }, + { + "$ref": "#/components/schemas/TaskBpmnErrorDto" + } + ] + }, + "ExternalTaskDto": { + "title": "ExternalTaskDto", + "type": "object", + "description": "An External Task object with the following properties", + "properties": { + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this external task belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance that the external task belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "The full error message submitted with the latest reported failure executing this task; `null` if no\nfailure was reported previously or if no error message was submitted" + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution that the external task belongs to." + }, + "id": { + "type": "string", + "nullable": true, + "description": "The id of the external task." + }, + "lockExpirationTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date that the task\u0027s most recent lock expires or has expired." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the external task is defined in." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition the external task is defined in." + }, + "processDefinitionVersionTag": { + "type": "string", + "nullable": true, + "description": "The version tag of the process definition the external task is defined in." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the external task belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant the external task belongs to." + }, + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries the task currently has left." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether the external task is suspended or not." + }, + "workerId": { + "type": "string", + "nullable": true, + "description": "The id of the worker that posesses or posessed the most recent lock." + }, + "topicName": { + "type": "string", + "nullable": true, + "description": "The topic name of the external task." + }, + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The priority of the external task." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key of the process instance the external task belongs to." + } + } + }, + "ExternalTaskFailureDto": { + "allOf": [ + { + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An message indicating the reason of the failure." + }, + "errorDetails": { + "type": "string", + "nullable": true, + "description": "A detailed error description." + }, + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "A number of how often the task should be retried. Must be \u003e\u003d 0. If this is 0, an incident is created and\nthe task cannot be fetched anymore unless the retries are increased again. The incident\u0027s message is set\nto the `errorMessage` parameter." + }, + "retryTimeout": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "A timeout in milliseconds before the external task becomes available again for fetching. Must be \u003e\u003d 0." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object with the following properties:" + }, + "localVariables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing local variable key-value pairs. Local variables are set only in the scope of external task. Each key is a variable name and each value a JSON variable value object with the following properties:" + } + } + }, + { + "$ref": "#/components/schemas/HandleExternalTaskDto" + } + ] + }, + "ExternalTaskQueryDto": { + "title": "ExternalTaskQueryDto", + "type": "object", + "description": "A JSON object with the following properties:", + "properties": { + "externalTaskId": { + "type": "string", + "nullable": true, + "description": "Filter by an external task\u0027s id." + }, + "externalTaskIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the comma-separated list of external task ids." + }, + "topicName": { + "type": "string", + "nullable": true, + "description": "Filter by an external task topic." + }, + "workerId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + "locked": { + "type": "boolean", + "nullable": true, + "description": "Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired).\nValue may only be `true`, as `false` matches any external task." + }, + "notLocked": { + "type": "boolean", + "nullable": true, + "description": "Only include external tasks that are currently not locked (i.e., they have no lock or it has expired).\nValue may only be `true`, as `false` matches any external task." + }, + "withRetriesLeft": { + "type": "boolean", + "nullable": true, + "description": "Only include external tasks that have a positive (\u0026gt; 0) number of retries (or `null`). Value may only be\n`true`, as `false` matches any external task." + }, + "noRetriesLeft": { + "type": "boolean", + "nullable": true, + "description": "Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any\nexternal task." + }, + "lockExpirationAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to external tasks that have a lock that expires after a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "lockExpirationBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to external tasks that have a lock that expires before a given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the activity that an external task is created for." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the comma-separated list of ids of the activities that an external task is created for." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the execution that an external task belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the process instance that an external task belongs to." + }, + "processInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a comma-separated list of process instance ids that an external task may belong to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the process definition that an external task belongs to." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids.\nAn external task must have one of the given tenant ids." + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Only include active tasks. Value may only be `true`, as `false` matches any external task." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Only include suspended tasks. Value may only be `true`, as `false` matches any external task." + }, + "priorityHigherThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include jobs with a priority higher than or equal to the given value.\nValue must be a valid `long` value." + }, + "priorityLowerThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include jobs with a priority lower than or equal to the given value.\nValue must be a valid `long` value." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "A JSON array of criteria to sort the result by. Each element of the array is a JSON object that\n specifies one ordering. The position in the array identifies the rank of an ordering, i.e., whether\n it is primary, secondary, etc. The ordering objects have the following properties:\n\n **Note:** The `sorting` properties will not be applied to the External Task count query.", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "id", + "lockExpirationTime", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "taskPriority", + "createTime", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "FetchExternalTaskTopicDto": { + "type": "object", + "required": [ + "topicName", + "lockDuration" + ], + "properties": { + "topicName": { + "type": "string", + "description": "**Mandatory.** The topic\u0027s name." + }, + "lockDuration": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "**Mandatory.** The duration to lock the external tasks for in milliseconds." + }, + "variables": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A JSON array of `String` values that represent variable names. For each result task belonging to this\ntopic, the given variables are returned as well if they are accessible from the external task\u0027s\nexecution. If not provided - all variables will be fetched." + }, + "localVariables": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "If `true` only local variables will be fetched." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "A `String` value which enables the filtering of tasks based on process instance business key." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter tasks based on process definition id." + }, + "processDefinitionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter tasks based on process definition ids." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter tasks based on process definition key." + }, + "processDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter tasks based on process definition keys." + }, + "processDefinitionVersionTag": { + "type": "string", + "nullable": true, + "description": "Filter tasks based on process definition version tag." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Filter tasks without tenant id." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter tasks based on tenant ids." + }, + "processVariables": { + "type": "object", + "additionalProperties": true, + "description": "A `JSON` object used for filtering tasks based on process instance variable values. A property name of\nthe object represents a process variable name, while the property value represents the process variable\nvalue to filter tasks by." + }, + "deserializeValues": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Determines whether serializable variable values (typically variables that store custom Java objects)\nshould be deserialized on server side (default `false`).\n\nIf set to `true`, a serializable variable will be deserialized on server side and transformed to JSON\nusing [Jackson\u0027s](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note\nthat this requires the Java classes of the variable value to be on the REST API\u0027s classpath.\n\nIf set to `false`, a serializable variable will be returned in its serialized format. For example, a\nvariable that is serialized as XML will be returned as a JSON string containing XML." + }, + "includeExtensionProperties": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Determines whether custom extension properties defined in the BPMN activity of the external task (e.g.\nvia the Extensions tab in the Camunda modeler) should be included in the response. Default: false" + } + } + }, + "FetchExternalTasksDto": { + "type": "object", + "required": [ + "workerId", + "maxTasks" + ], + "properties": { + "workerId": { + "type": "string", + "description": "**Mandatory.** The id of the worker on which behalf tasks are fetched. The returned tasks are locked for\nthat worker and can only be completed when providing the same worker id." + }, + "maxTasks": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "**Mandatory.** The maximum number of tasks to return." + }, + "usePriority": { + "type": "boolean", + "nullable": true, + "description": "A `boolean` value, which indicates whether the task should be fetched based on its priority\nor arbitrarily." + }, + "asyncResponseTimeout": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The [Long Polling](https://docs.camunda.org/manual/7.22/user-guide/process-engine/external-tasks/#long-polling-to-fetch-and-lock-external-tasks)\ntimeout in milliseconds.\n\n**Note:** The value cannot be set larger than 1.800.000 milliseconds (corresponds to 30 minutes)." + }, + "topics": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/FetchExternalTaskTopicDto" + }, + "description": "A JSON array of topic objects for which external tasks should be fetched. The returned tasks may be\narbitrarily distributed among these topics. Each topic object has the following properties:" + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "createTime" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "FilterDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the filter." + }, + "resourceType": { + "type": "string", + "nullable": true, + "description": "The resource type of the filter." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the filter." + }, + "owner": { + "type": "string", + "nullable": true, + "description": "The user id of the owner of the filter." + }, + "query": { + "type": "object", + "description": "The query of the filter as a JSON object." + }, + "properties": { + "type": "object", + "description": "The properties of a filter as a JSON object." + }, + "itemCount": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "\nThe number of items matched by the filter itself. Note: Only exists\nif the query parameter\n`itemCount` was set to `true`" + } + } + }, + "FormDto": { + "title": "FormDto", + "type": "object", + "properties": { + "key": { + "type": "string", + "nullable": true, + "description": "The form key." + }, + "camundaFormRef": { + "$ref": "#/components/schemas/CamundaFormRef" + }, + "contextPath": { + "type": "string", + "nullable": true, + "description": "The context path of the process application. If the task (or the process definition) does not\nbelong to a process application deployment or a process definition at all, this\nproperty is not set." + } + } + }, + "GroupDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the group." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the group." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of the group." + } + } + }, + "GroupQueryDto": { + "type": "object", + "description": "A group instance query which defines a list of group instances", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the group." + }, + "idIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a JSON string array of group ids." + }, + "name": { + "type": "string", + "nullable": true, + "description": "Filter by the name of the group." + }, + "nameLike": { + "type": "string", + "nullable": true, + "description": "Filter by the name that the parameter is a substring of." + }, + "type": { + "type": "string", + "nullable": true, + "description": "Filter by the type of the group." + }, + "member": { + "type": "string", + "nullable": true, + "description": "Only retrieve groups where the given user id is a member of." + }, + "memberOfTenant": { + "type": "string", + "nullable": true, + "description": "Only retrieve groups which are members of the given tenant." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "id", + "name", + "type" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HandleExternalTaskDto": { + "type": "object", + "properties": { + "workerId": { + "type": "string", + "description": "**Mandatory.** The ID of the worker who is performing the operation on the external task.\nIf the task is already locked, must match the id of the worker who has most recently\nlocked the task." + } + } + }, + "HistoricActivityInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance." + }, + "parentActivityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent activity instance, for example a sub process instance." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this object is an instance of." + }, + "activityName": { + "type": "string", + "nullable": true, + "description": "The name of the activity that this object is an instance of." + }, + "activityType": { + "type": "string", + "nullable": true, + "description": "The type of the activity that this object is an instance of." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition that this activity instance belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this activity instance belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance that this activity instance belongs to." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution that executed this activity instance." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task that is associated to this activity instance. Is only set if the activity is a user task." + }, + "assignee": { + "type": "string", + "nullable": true, + "description": "The assignee of the task that is associated to this activity instance. Is only set if the activity is a user task." + }, + "calledProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the called process instance. Is only set if the activity is a call activity and the called instance a process instance." + }, + "calledCaseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the called case instance. Is only set if the activity is a call activity and the called instance a case instance." + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the instance was started. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the instance ended. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "durationInMillis": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The time the instance took to finish (in milliseconds)." + }, + "canceled": { + "type": "boolean", + "nullable": true, + "description": "If `true`, this activity instance is canceled." + }, + "completeScope": { + "type": "boolean", + "nullable": true, + "description": "If `true`, this activity instance did complete a BPMN 2.0 scope." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the activity instance." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the activity instance should be removed by the History Cleanup job. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process containing this activity instance." + } + } + }, + "HistoricActivityInstanceQueryDto": { + "type": "object", + "description": "A historic activity instance query which defines a group of historic activity instances", + "properties": { + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by activity instance id." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by process definition id." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the execution that executed the activity instance." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Filter by the activity id (according to BPMN 2.0 XML)." + }, + "activityName": { + "type": "string", + "nullable": true, + "description": "Filter by the activity name (according to BPMN 2.0 XML)." + }, + "activityType": { + "type": "string", + "nullable": true, + "description": "Filter by activity type." + }, + "taskAssignee": { + "type": "string", + "nullable": true, + "description": "Only include activity instances that are user tasks and assigned to a given user." + }, + "finished": { + "type": "boolean", + "nullable": true, + "description": "Only include finished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + "unfinished": { + "type": "boolean", + "nullable": true, + "description": "Only include unfinished activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + "canceled": { + "type": "boolean", + "nullable": true, + "description": "Only include canceled activity instances.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + "completeScope": { + "type": "boolean", + "nullable": true, + "description": "Only include activity instances which completed a scope.\nValue may only be `true`, as `false` behaves the same as when the property is not set." + }, + "startedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Must be a JSON array of Strings. An activity instance must have one of the given tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic activity instances that belong to no tenant. Value may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "activityInstanceId", + "instanceId", + "executionId", + "activityId", + "activityName", + "activityType", + "startTime", + "endTime", + "duration", + "definitionId", + "occurrence", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricActivityStatisticsDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the activity the results are aggregated for." + }, + "instances": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of all running instances of the activity." + }, + "canceled": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of all canceled instances of the activity. **Note:** Will be `0`\n(not `null`), if canceled activity instances were excluded." + }, + "finished": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of all finished instances of the activity. **Note:** Will be `0`\n(not `null`), if finished activity instances were excluded." + }, + "completeScope": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of all instances which completed a scope of the activity.\n**Note:** Will be `0` (not `null`), if activity instances which\ncompleted a scope were excluded." + }, + "openIncidents": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of open incidents for the activity. **Note:** Will be `0` (not\n`null`), if `incidents` is set to `false`." + }, + "resolvedIncidents": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of resolved incidents for the activity. **Note:** Will be `0` (not\n`null`), if `incidents` is set to `false`." + }, + "deletedIncidents": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The total number of deleted incidents for the activity. **Note:** Will be `0` (not\n`null`), if `incidents` is set to `false`." + } + } + }, + "HistoricBatchDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the batch." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of the batch. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + "totalJobs": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "\nThe total jobs of a batch is the number of batch execution\njobs required to complete the batch.\n" + }, + "batchJobsPerSeed": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "\nThe number of batch execution jobs created per seed job invocation.\nThe batch seed job is invoked until it has created all batch\nexecution jobs required by the batch (see `totalJobs` property).\n" + }, + "invocationsPerBatchJob": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "\nEvery batch execution job invokes the command executed by the batch\n`invocationsPerBatchJob` times. E.g., for a process instance\nmigration batch this specifies the number of process instances\nwhich are migrated per batch execution job.\n" + }, + "seedJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the seed jobs of this batch." + }, + "monitorJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the monitor jobs of this batch." + }, + "batchJobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id for the batch execution jobs of this batch." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the batch." + }, + "createUserId": { + "type": "string", + "nullable": true, + "description": "The batch creator\u0027s user id." + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the batch was started. Default format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`.\nFor further information, please see the [documentation](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "executionStartTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the batch execution was started, i.e., at least one batch job has been executed. Default format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`. For further information, please see the [documentation]\n(https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the batch ended. Default format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`.\nFor further information, please see the [documentation](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the historic batch should be removed by the History Cleanup\njob. Default format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`.\nFor further information, please see the [documentation](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + } + } + }, + "HistoricBatchQueryDto": { + "type": "object", + "description": "Query for the historic batches to set the removal time for.", + "properties": { + "batchId": { + "type": "string", + "nullable": true, + "description": "Filter by batch id." + }, + "type": { + "type": "string", + "nullable": true, + "description": "Filter by batch type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/batch/#creating-a-batch)\nfor more information about batch types." + }, + "completed": { + "type": "boolean", + "nullable": true, + "description": "\nFilter completed or not completed batches. If the value is\n`true`, only completed batches, i.e., end time is set, are\nreturned. Otherwise, if the value is `false`, only running\nbatches, i.e., end time is null, are returned." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A batch matches if it has one of the given\ntenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include batches which belong to no tenant. Value can effectively only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Has no effect for the `/count` endpoint", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "batchId", + "startTime", + "endTime", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricDecisionInputInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision input value." + }, + "decisionInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the decision instance the input value belongs to." + }, + "clauseId": { + "type": "string", + "nullable": true, + "description": "The id of the clause the input value belongs to." + }, + "clauseName": { + "type": "string", + "nullable": true, + "description": "The name of the clause the input value belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message in case a Java Serialized Object could not be de-serialized." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The value type of the variable." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the variable was inserted. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the entry should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this entry." + }, + "value": { + "type": "object", + "description": "The variable\u0027s value. Value differs depending on the variable\u0027s type\nand on the `disableCustomObjectDeserialization` parameter." + }, + "valueInfo": { + "type": "object", + "additionalProperties": true, + "description": "A JSON object containing additional, value-type-dependent\nproperties.\n\nFor variables of type `Object`, the following properties are\nreturned:\n\n* `objectTypeName`: A string representation of the object\u0027s type\nname.\n\n* `serializationDataFormat`: The serialization format used to store\nthe variable." + } + } + }, + "HistoricDecisionInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision instance." + }, + "decisionDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the decision definition that this decision instance belongs to." + }, + "decisionDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the decision definition that this decision instance belongs to." + }, + "decisionDefinitionName": { + "type": "string", + "nullable": true, + "description": "The name of the decision definition that this decision instance belongs to." + }, + "evaluationTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the instance was evaluated. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the instance should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this decision instance belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition that this decision instance belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance that this decision instance belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the case definition that this decision instance belongs to." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the case definition that this decision instance belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance that this decision instance belongs to." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this decision instance belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance that this decision instance belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the historic decision instance." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the authenticated user that has evaluated this decision instance without\na process or case instance." + }, + "inputs": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/HistoricDecisionInputInstanceDto" + }, + "description": "The list of decision input values. **Only exists** if `includeInputs`\nwas set to `true` in the query." + }, + "outputs": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/HistoricDecisionOutputInstanceDto" + }, + "description": "The list of decision output values. **Only exists** if `includeOutputs`\nwas set to `true` in the query." + }, + "collectResultValue": { + "type": "number", + "format": "double", + "nullable": true, + "description": "The result of the collect aggregation of the decision result if used. `null` if no\naggregation was used." + }, + "rootDecisionInstanceId": { + "type": "string", + "nullable": true, + "description": "The decision instance id of the evaluated root decision. Can be `null` if this\ninstance is the root decision instance of the evaluation." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the evaluation\nof this decision. Can be `null` if this decision instance is not\nevaluated as part of a BPMN process." + }, + "decisionRequirementsDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the decision requirements definition that this decision instance belongs\nto." + }, + "decisionRequirementsDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the decision requirements definition that this decision instance belongs\nto." + } + } + }, + "HistoricDecisionInstanceQueryDto": { + "type": "object", + "description": "A historic decision instance query which defines a list of historic decision instances", + "properties": { + "decisionInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by decision instance id." + }, + "decisionInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by decision instance ids. Must be a comma-separated list of decision instance ids." + }, + "decisionDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the decision definition the instances belongs to." + }, + "decisionDefinitionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the decision definitions the instances belongs to. Must be a\ncomma-separated list of decision definition ids." + }, + "decisionDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the decision definition the instances belongs to." + }, + "decisionDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the keys of the decision definition the instances belongs to. Must be a comma-\nseparated list of decision definition keys." + }, + "decisionDefinitionName": { + "type": "string", + "nullable": true, + "description": "Filter by the name of the decision definition the instances belongs to." + }, + "decisionDefinitionNameLike": { + "type": "string", + "nullable": true, + "description": "Filter by the name of the decision definition the instances belongs to, that the parameter\nis a substring of." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the process definition the instances belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the process definition the instances belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the process instance the instances belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the case definition the instances belongs to." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the case definition the instances belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the case instance the instances belongs to." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the activity ids the instances belongs to.\nMust be a comma-separated list of acitvity ids." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by the activity instance ids the instances belongs to.\nMust be a comma-separated list of acitvity instance ids." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a comma-separated list of tenant ids. A historic decision instance must have one\nof the given tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic decision instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + "evaluatedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were evaluated before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "evaluatedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were evaluated after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "Restrict to instances that were evaluated by the given user." + }, + "rootDecisionInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict to instances that have a given root decision instance id.\nThis also includes the decision instance with the given id." + }, + "rootDecisionInstancesOnly": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances those are the root decision instance of an evaluation.\nValue may only be `true`, as `false` is the default behavior." + }, + "decisionRequirementsDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the decision requirements definition the instances belongs to." + }, + "decisionRequirementsDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the decision requirements definition the instances belongs to." + }, + "includeInputs": { + "type": "boolean", + "nullable": true, + "description": "Include input values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + "includeOutputs": { + "type": "boolean", + "nullable": true, + "description": "Include output values in the result.\nValue may only be `true`, as `false` is the default behavior." + }, + "disableBinaryFetching": { + "type": "boolean", + "nullable": true, + "description": "Disables fetching of byte array input and output values.\nValue may only be `true`, as `false` is the default behavior." + }, + "disableCustomObjectDeserialization": { + "type": "boolean", + "nullable": true, + "description": "Disables deserialization of input and output values that are custom objects.\nValue may only be `true`, as `false` is the default behavior." + } + } + }, + "HistoricDecisionInstanceStatisticsDto": { + "type": "object", + "properties": { + "decisionDefinitionKey": { + "type": "string", + "nullable": true, + "description": "A key of decision definition." + }, + "evaluations": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "A number of evaluation for decision definition." + } + } + }, + "HistoricDecisionOutputInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the decision output value." + }, + "decisionInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the decision instance the output value belongs to." + }, + "clauseId": { + "type": "string", + "nullable": true, + "description": "The id of the clause the output value belongs to." + }, + "clauseName": { + "type": "string", + "nullable": true, + "description": "The name of the clause the output value belongs to." + }, + "ruleId": { + "type": "string", + "nullable": true, + "description": "The id of the rule the output value belongs to." + }, + "ruleOrder": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The order of the rule the output value belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message in case a Java Serialized Object could not be de-serialized." + }, + "variableName": { + "type": "string", + "nullable": true, + "description": "The name of the output variable." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The value type of the variable." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the variable was inserted. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the entry should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this entry." + }, + "value": { + "type": "object", + "description": "The variable\u0027s value. Value differs depending on the variable\u0027s type\nand on the `disableCustomObjectDeserialization` parameter." + }, + "valueInfo": { + "type": "object", + "additionalProperties": true, + "description": "A JSON object containing additional, value-type-dependent\nproperties.\n\nFor variables of type `Object`, the following properties are\nreturned:\n\n* `objectTypeName`: A string representation of the object\u0027s type\nname.\n\n* `serializationDataFormat`: The serialization format used to store\nthe variable." + } + } + }, + "HistoricDetailDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the historic detail." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of the historic detail. Either `formField` for a submitted form field\nvalue or `variableUpdate` for variable updates." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition that this historic detail belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this historic detail belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the historic detail belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance the historic detail belongs to." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution the historic detail belongs to." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the case definition that this historic detail belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the case definition that this historic detail belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance the historic detail belongs to." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "The id of the case execution the historic detail belongs to." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task the historic detail belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant that this historic detail belongs to." + }, + "userOperationId": { + "type": "string", + "nullable": true, + "description": "The id of user operation which links historic detail with\n[user operation log](https://docs.camunda.org/manual/7.22/reference/rest/history/user-operation-log/)\nentries." + }, + "time": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when this historic detail occurred. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the historic detail should be removed by the History Cleanup job.\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this historic detail." + }, + "fieldId": { + "type": "string", + "nullable": true, + "description": "The id of the form field.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `formField`." + }, + "fieldValue": { + "type": "object", + "description": "The submitted form field value. The value differs depending on the form field\u0027s type\nand on the `deserializeValue` parameter.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `formField`." + }, + "variableName": { + "type": "string", + "nullable": true, + "description": "The name of the variable which has been updated.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "variableInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the associated variable instance.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "variableType": { + "type": "string", + "nullable": true, + "description": "The value type of the variable.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "value": { + "type": "object", + "description": "The variable\u0027s value. Value differs depending on the variable\u0027s type\nand on the deserializeValues parameter.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "valueInfo": { + "type": "object", + "additionalProperties": true, + "description": "A JSON object containing additional, value-type-dependent properties.\nFor variables of type `Object`, the following properties are returned:\n\n* `objectTypeName`: A string representation of the object\u0027s type name.\n* `serializationDataFormat`: The serialization format used to store the variable.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "initial": { + "type": "boolean", + "nullable": true, + "description": "Returns `true` for variable updates that contains the initial values of the variables.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "revision": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The revision of the historic variable update.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message in case a Java Serialized Object\ncould not be de-serialized.\n\n**Note:** This property is only set for a `HistoricVariableUpdate` historic details.\nIn these cases, the value of the `type` property is `variableUpdate`." + } + } + }, + "HistoricDetailQueryDto": { + "type": "object", + "description": "A historic detail query which defines a group of historic details.", + "properties": { + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "processInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic details which belong to one of the passed process instance ids." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Filter by execution id." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "Filter by task id." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by activity instance id." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by case instance id." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "Filter by case execution id." + }, + "variableInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by variable instance id." + }, + "variableTypeIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic details where the variable updates belong to one of the passed \nlist of variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type `serializable`." + }, + "variableNameLike": { + "type": "string", + "nullable": true, + "description": "Filter by variable name like. Example usage: `variableNameLike(%camunda%)`. The query will match the names of variables in a case-insensitive way." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic details that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + "userOperationId": { + "type": "string", + "nullable": true, + "description": "Filter by a user operation id." + }, + "formFields": { + "type": "boolean", + "nullable": true, + "description": "Only include `HistoricFormFields`. Value may only be `true`, as `false` is the default behavior." + }, + "variableUpdates": { + "type": "boolean", + "nullable": true, + "description": "Only include `HistoricVariableUpdates`. Value may only be `true`, as `false` is the default behavior." + }, + "excludeTaskDetails": { + "type": "boolean", + "nullable": true, + "description": "Excludes all task-related `HistoricDetails`, so only items which have no task id set will be selected.\nWhen this parameter is used together with `taskId`, this call is ignored and task details are not excluded.\nValue may only be `true`, as `false` is the default behavior." + }, + "initial": { + "type": "boolean", + "nullable": true, + "description": "Restrict to historic variable updates that contain only initial variable values.\nValue may only be `true`, as `false` is the default behavior." + }, + "occurredBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to historic details that occured before the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + }, + "occurredAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to historic details that occured after the given date (including the date).\nDefault [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., 2013-01-23T14:42:45.000+0200." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "A JSON array of criteria to sort the result by. Each element of the array is\n a JSON object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Does not have an effect for the `count` endpoint.", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "processInstanceId", + "variableName", + "variableType", + "variableRevision", + "formPropertyId", + "time", + "occurrence", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricExternalTaskLogDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the log entry." + }, + "externalTaskId": { + "type": "string", + "nullable": true, + "description": "The id of the external task." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when the log entry has been written." + }, + "topicName": { + "type": "string", + "nullable": true, + "description": "The topic name of the associated external task." + }, + "workerId": { + "type": "string", + "nullable": true, + "description": "The id of the worker that posessed the most recent lock." + }, + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries the associated external task has left." + }, + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The execution priority the external task had when the log entry was created." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "The message of the error that occurred by executing the associated external task." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the associated external task was created." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance on which the associated external task was created." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution id on which the associated external task was created." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance on which the associated external task was created." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition which the associated external task belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition which the associated external task belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant that this historic external task log entry belongs to." + }, + "creationLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the creation of the associated\nexternal task." + }, + "failureLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the failed execution of the\nassociated external task." + }, + "successLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the successful execution of the\nassociated external task." + }, + "deletionLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the deletion of the associated\nexternal task." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which this log should be removed by the History Cleanup job. Default\nformat `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`. For further information, please see the [documentation](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this log." + } + } + }, + "HistoricExternalTaskLogQueryDto": { + "type": "object", + "description": "A Historic External Task Log instance query which defines a list of Historic External Task Log instances", + "properties": { + "logId": { + "type": "string", + "nullable": true, + "description": "Filter by historic external task log id." + }, + "externalTaskId": { + "type": "string", + "nullable": true, + "description": "Filter by external task id." + }, + "topicName": { + "type": "string", + "nullable": true, + "description": "Filter by an external task topic." + }, + "workerId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the worker that the task was most recently locked by." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "Filter by external task exception message." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity ids." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed activity\ninstance ids." + }, + "executionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic external task logs which belong to one of the passed execution ids." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by process definition id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by process definition key." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic external task log entries which belong to one of the passed and\ncomma-separated tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic external task log entries that belong to no tenant. Value may only\nbe `true`, as `false` is the default behavior." + }, + "priorityLowerThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include logs for which the associated external task had a priority lower than or\nequal to the given value. Value must be a valid `long` value." + }, + "priorityHigherThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include logs for which the associated external task had a priority higher than or\nequal to the given value. Value must be a valid `long` value." + }, + "creationLog": { + "type": "boolean", + "nullable": true, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + "failureLog": { + "type": "boolean", + "nullable": true, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + "successLog": { + "type": "boolean", + "nullable": true, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + "deletionLog": { + "type": "boolean", + "nullable": true, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Sorting has no effect for `count` endpoints.", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "timestamp", + "externalTaskId", + "topicName", + "workerId", + "retries", + "priority", + "activityId", + "activityInstanceId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricIdentityLinkLogDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "Id of the Historic identity link entry." + }, + "time": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when the identity link is logged. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of identity link (candidate/assignee/owner)." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user/assignee." + }, + "groupId": { + "type": "string", + "nullable": true, + "description": "The id of the group." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition." + }, + "operationType": { + "type": "string", + "nullable": true, + "description": "Type of operation (add/delete)." + }, + "assignerId": { + "type": "string", + "nullable": true, + "description": "The id of the assigner." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the identity link should be removed by the History Cleanup job. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this identity link." + } + } + }, + "HistoricIncidentDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the incident." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition this incident is associated with." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition this incident is associated with." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The key of the process definition this incident is associated with." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution this incident is associated with." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this incident." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time this incident happened. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time this incident has been deleted or resolved. \n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the incident should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "incidentType": { + "type": "string", + "nullable": true, + "description": "The type of incident, for example: `failedJobs` will be returned in case of an\nincident which identified a failed job during the execution of a\nprocess instance. See the [User Guide](/manual/develop/user-\nguide/process-engine/incidents/#incident-types) for a list of\nincident types." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity this incident is associated with." + }, + "failedActivityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the last exception occurred." + }, + "causeIncidentId": { + "type": "string", + "nullable": true, + "description": "The id of the associated cause incident which has been triggered." + }, + "rootCauseIncidentId": { + "type": "string", + "nullable": true, + "description": "The id of the associated root cause incident which has been triggered." + }, + "configuration": { + "type": "string", + "nullable": true, + "description": "The payload of this incident." + }, + "historyConfiguration": { + "type": "string", + "nullable": true, + "description": "The payload of this incident at the time when it occurred." + }, + "incidentMessage": { + "type": "string", + "nullable": true, + "description": "The message of this incident." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant this incident is associated with." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id the incident is associated with." + }, + "open": { + "type": "boolean", + "nullable": true, + "description": "If true, this incident is open." + }, + "deleted": { + "type": "boolean", + "nullable": true, + "description": "If true, this incident has been deleted." + }, + "resolved": { + "type": "boolean", + "nullable": true, + "description": "If true, this incident has been resolved." + }, + "annotation": { + "type": "string", + "nullable": true, + "description": "The annotation set to the incident." + } + } + }, + "HistoricJobLogDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the log entry." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time when the log entry has been written." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the log entry should be removed by the History Cleanup job.\nDefault format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`. For further info see the\n[docs](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)" + }, + "jobId": { + "type": "string", + "nullable": true, + "description": "The id of the associated job." + }, + "jobDueDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date on which the associated job is supposed to be processed." + }, + "jobRetries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries the associated job has left." + }, + "jobPriority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The execution priority the job had when the log entry was created." + }, + "jobExceptionMessage": { + "type": "string", + "nullable": true, + "description": "The message of the exception that occurred by executing the associated job." + }, + "failedActivityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the last exception occurred by executing the\nassociated job." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the job definition on which the associated job was created." + }, + "jobDefinitionType": { + "type": "string", + "nullable": true, + "description": "The job definition type of the associated job. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job definition types." + }, + "jobDefinitionConfiguration": { + "type": "string", + "nullable": true, + "description": "The job definition configuration type of the associated job." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the associated job was created." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution id on which the associated job was created." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance on which the associated job was created." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition which the associated job belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition which the associated job belongs to." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The id of the deployment which the associated job belongs to." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\nwhich the associated job belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant that this historic job log entry belongs to." + }, + "hostname": { + "type": "string", + "nullable": true, + "description": "\nThe name of the host of the Process Engine where the\njob of this historic job log entry was executed." + }, + "batchId": { + "type": "string", + "nullable": true, + "description": "The ID of the batch associated with this job. `null` if no batch is associated with this job. The\nfollowing jobs are associated with batches:\n* Seed Jobs\n* Monitor Jobs\n* Batch Execution Jobs" + }, + "creationLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the creation of the associated job." + }, + "failureLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the failed execution of the\nassociated job." + }, + "successLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the successful execution of the\nassociated job." + }, + "deletionLog": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether this log represents the deletion of the associated job." + } + } + }, + "HistoricJobLogQueryDto": { + "type": "object", + "description": "A Historic Job Log instance query which defines a list of Historic Job Log instances", + "properties": { + "logId": { + "type": "string", + "nullable": true, + "description": "Filter by historic job log id." + }, + "jobId": { + "type": "string", + "nullable": true, + "description": "Filter by job id." + }, + "jobExceptionMessage": { + "type": "string", + "nullable": true, + "description": "Filter by job exception message." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by job definition id." + }, + "jobDefinitionType": { + "type": "string", + "nullable": true, + "description": "Filter by job definition type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job definition types." + }, + "jobDefinitionConfiguration": { + "type": "string", + "nullable": true, + "description": "Filter by job definition configuration." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed activity ids." + }, + "failedActivityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic job logs which belong to failures of one of the passed activity ids." + }, + "executionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic job logs which belong to one of the passed execution ids." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by process definition id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by process definition key." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "Filter by deployment id." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic job log entries which belong to one of the passed and comma-\nseparated tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic job log entries that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + "hostname": { + "type": "string", + "nullable": true, + "description": "Filter by hostname." + }, + "jobPriorityLowerThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include logs for which the associated job had a priority lower than or equal to the\ngiven value. Value must be a valid `long` value." + }, + "jobPriorityHigherThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include logs for which the associated job had a priority higher than or equal to the\ngiven value. Value must be a valid `long` value." + }, + "creationLog": { + "type": "boolean", + "nullable": true, + "description": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." + }, + "failureLog": { + "type": "boolean", + "nullable": true, + "description": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." + }, + "successLog": { + "type": "boolean", + "nullable": true, + "description": "Only include success logs. Value may only be `true`, as `false` is the default behavior." + }, + "deletionLog": { + "type": "boolean", + "nullable": true, + "description": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Sorting has no effect for `count` endpoints", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "timestamp", + "jobId", + "jobDefinitionId", + "jobDueDate", + "jobRetries", + "jobPriority", + "activityId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "deploymentId", + "hostname", + "occurrence", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricProcessInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the process instance." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process." + }, + "superProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent process instance, if it exists." + }, + "superCaseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent case instance, if it exists." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent case instance, if it exists." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "The name of the process definition that this process instance belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition that this process instance belongs to." + }, + "processDefinitionVersion": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the process definition that this process instance belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this process instance belongs to." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key of the process instance." + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the instance was started. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the instance ended. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the instance should be removed by the History Cleanup job. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "durationInMillis": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The time the instance took to finish (in milliseconds)." + }, + "startUserId": { + "type": "string", + "nullable": true, + "description": "The id of the user who started the process instance." + }, + "startActivityId": { + "type": "string", + "nullable": true, + "description": "The id of the initial activity that was executed (e.g., a start event)." + }, + "deleteReason": { + "type": "string", + "nullable": true, + "description": "The provided delete reason in case the process instance was canceled during execution." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the process instance." + }, + "state": { + "type": "string", + "nullable": true, + "enum": [ + "ACTIVE", + "SUSPENDED", + "COMPLETED", + "EXTERNALLY_TERMINATED", + "INTERNALLY_TERMINATED" + ], + "description": "Last state of the process instance, possible values are:\n\n`ACTIVE` - running process instance\n\n`SUSPENDED` - suspended process instances\n\n`COMPLETED` - completed through normal end event\n\n`EXTERNALLY_TERMINATED` - terminated externally, for instance through REST API\n\n`INTERNALLY_TERMINATED` - terminated internally, for instance by terminating boundary event" + }, + "restartedProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the original process instance which was restarted." + } + } + }, + "HistoricProcessInstanceQueryDto": { + "type": "object", + "description": "A historic process instance query which defines a group of historic process instances", + "properties": { + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by process instance ids. Must be a JSON array of `Strings`." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the process definition the instances run on." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the process definition the instances run on." + }, + "processDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Must be a JSON array of `Strings`." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "Filter by the name of the process definition the instances run on." + }, + "processDefinitionNameLike": { + "type": "string", + "nullable": true, + "description": "Filter by process definition names that the parameter is a substring of." + }, + "processDefinitionKeyNotIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Exclude instances that belong to a set of process definitions. Must be a JSON array of `Strings`." + }, + "processInstanceBusinessKey": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key." + }, + "processInstanceBusinessKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of business keys. A process instance must have one of the given business keys. Must be a JSON array of `Strings`" + }, + "processInstanceBusinessKeyLike": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + "rootProcessInstances": { + "type": "boolean", + "nullable": true, + "description": "Restrict the query to all process instances that are top level process instances." + }, + "finished": { + "type": "boolean", + "nullable": true, + "description": "Only include finished process instances. This flag includes all process instances\nthat are completed or terminated. Value may only be `true`, as `false` is the default behavior." + }, + "unfinished": { + "type": "boolean", + "nullable": true, + "description": "Only include unfinished process instances. Value may only be `true`, as `false` is the default behavior." + }, + "withIncidents": { + "type": "boolean", + "nullable": true, + "description": "Only include process instances which have an incident. Value may only be `true`, as `false` is the default behavior." + }, + "withRootIncidents": { + "type": "boolean", + "nullable": true, + "description": "Only include process instances which have a root incident. Value may only be `true`, as `false` is the default behavior." + }, + "incidentIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to instances that have an incident with one of the given ids. Must be a JSON array of `Strings`" + }, + "incidentType": { + "type": "string", + "nullable": true, + "description": "Filter by the incident type. See the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + "incidentStatus": { + "type": "string", + "nullable": true, + "enum": [ + "open", + "resolved" + ], + "description": "Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents." + }, + "incidentMessage": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message. Exact match." + }, + "incidentMessageLike": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message that the parameter is a substring of." + }, + "startedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were started before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were started after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were finished before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that were finished after the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedActivityAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that executed an activity after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedActivityBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that executed an activity before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedJobAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that executed an job after the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "executedJobBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to instances that executed an job before the given date (inclusive).\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedBy": { + "type": "string", + "nullable": true, + "description": "Only include process instances that were started by the given user." + }, + "superProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id." + }, + "subProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict query to one process instance that has a sub process instance with the given id." + }, + "superCaseInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + "subCaseInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict query to one process instance that has a sub case instance with the given id." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Must be a JSON array of `Strings`" + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic process instances which belong to no tenant. Value may only be `true`, as `false` is the default behavior." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to instances with an active activity with one of the given ids. This filter behaves differently as `activeActivityIdIn` since it also yields results when filtering for activities with an incident. Must be a JSON array of `Strings`" + }, + "executedActivityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to instances that executed an activity with one of given ids. Must be a JSON array of `Strings`" + }, + "activeActivityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to instances that have an active activity with one of given ids. Must be a JSON array of `Strings`" + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances that are active." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances that are suspended." + }, + "completed": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances that are completed." + }, + "externallyTerminated": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances that are externallyTerminated." + }, + "internallyTerminated": { + "type": "boolean", + "nullable": true, + "description": "Restrict to instances that are internallyTerminated." + }, + "variables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "A JSON array to only include process instances that have/had variables with certain values.\nThe array consists of objects with the three properties `name`, `operator` and `value`. `name` (`String`) is the variable name,\n`operator` (`String`) is the comparison operator to be used and `value` the variable value.\n\nValue may be `String`, `Number` or `Boolean`.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`.\n" + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable names provided in variables case-insensitively. If set to `true` variableName and variablename are treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable values provided in variables case-insensitively. If set to `true` variableValue and variablevalue are treated as equal." + }, + "orQueries": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "description": "A JSON array of nested historic process instance queries with OR semantics.\n\nA process instance matches a nested query if it fulfills at least one of the query\u0027s predicates.\n\nWith multiple nested queries, a process instance must fulfill at least one predicate of each query\n([Conjunctive Normal Form](https://en.wikipedia.org/wiki/Conjunctive_normal_form)).\n\nAll process instance query properties can be used except for: `sorting`\n\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-engine-api/#or-queries) for more information about OR queries." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "instanceId", + "definitionId", + "definitionKey", + "definitionName", + "definitionVersion", + "businessKey", + "startTime", + "endTime", + "duration", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricTaskInstanceDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The task id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition the task belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the task belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the task belongs to." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution the task belongs to." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the case definition the task belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the case definition the task belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance the task belongs to." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "The id of the case execution the task belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this object is an instance of." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The task name." + }, + "description": { + "type": "string", + "nullable": true, + "description": "The task\u0027s description." + }, + "deleteReason": { + "type": "string", + "nullable": true, + "description": "The task\u0027s delete reason." + }, + "owner": { + "type": "string", + "nullable": true, + "description": "The owner\u0027s id." + }, + "assignee": { + "type": "string", + "nullable": true, + "description": "The assignee\u0027s id." + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the task was started. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the task ended. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "duration": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The time the task took to finish (in milliseconds)." + }, + "taskDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The task\u0027s key." + }, + "priority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The task\u0027s priority." + }, + "due": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The task\u0027s due date. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "parentTaskId": { + "type": "string", + "nullable": true, + "description": "The id of the parent task, if this task is a subtask." + }, + "followUp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The follow-up date for the task. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the task instance." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the task should be removed by the History Cleanup job. Default [format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this task." + } + } + }, + "HistoricTaskInstanceQueryDto": { + "type": "object", + "description": "A Historic Task instance query which defines a list of Historic Task instances", + "properties": { + "taskId": { + "type": "string", + "nullable": true, + "description": "Filter by task id." + }, + "taskParentTaskId": { + "type": "string", + "nullable": true, + "description": "Filter by parent task id." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by process instance id." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by root process instance id." + }, + "processInstanceBusinessKey": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key." + }, + "processInstanceBusinessKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by process instances with one of the give business keys.\nThe keys need to be in a comma-separated list." + }, + "processInstanceBusinessKeyLike": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key that has the parameter value as a substring." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the execution that executed the task." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by process definition id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by case instance id." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the case execution that executed the task." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by case definition id." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + "caseDefinitionName": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed activity instance ids." + }, + "taskName": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given name." + }, + "taskNameLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + "taskDescription": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given description." + }, + "taskDescriptionLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a description that has the parameter value as a substring." + }, + "taskDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given key." + }, + "taskDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the passed task definition keys." + }, + "taskDeleteReason": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given delete reason." + }, + "taskDeleteReasonLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a delete reason that has the parameter value as a substring." + }, + "taskAssignee": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the given user is assigned to." + }, + "taskAssigneeLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are assigned to users with the parameter value as a substring." + }, + "taskOwner": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the given user owns." + }, + "taskOwnerLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are owned by users with the parameter value as a substring." + }, + "taskPriority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Restrict to tasks that have the given priority." + }, + "assigned": { + "type": "boolean", + "nullable": true, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + "unassigned": { + "type": "boolean", + "nullable": true, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + "finished": { + "type": "boolean", + "nullable": true, + "description": "Only include finished tasks. Value may only be `true`, as `false` is the default behavior." + }, + "unfinished": { + "type": "boolean", + "nullable": true, + "description": "Only include unfinished tasks. Value may only be `true`, as `false` is the default\nbehavior." + }, + "processFinished": { + "type": "boolean", + "nullable": true, + "description": "Only include tasks of finished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "processUnfinished": { + "type": "boolean", + "nullable": true, + "description": "Only include tasks of unfinished processes. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "taskDueDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "taskDueDateBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "taskDueDateAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "withoutTaskDueDate": { + "type": "boolean", + "nullable": true, + "description": "Only include tasks which have no due date. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "taskFollowUpDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have a followUp date on the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "taskFollowUpDateBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have a followUp date before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "taskFollowUpDateAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have a followUp date after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were started before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "startedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were started after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were finished before the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "finishedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were finished after the given date. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. A task instance must have one of the given\ntenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic task instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + "taskVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "Only include tasks that have variables with certain values. Variable filtering expressions are\ncomma-separated and are structured as follows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + "processVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "Only include tasks that belong to process instances that have variables with certain\nvalues. Variable filtering expressions are comma-separated and are structured as\nfollows:\n\nA valid parameter value has the form `key_operator_value`.\n`key` is the variable name, `operator` is the comparison operator to be used\nand `value` the variable value.\n**Note:** Values are always treated as `String` objects on server side.\n\n\nValid operator values are:\n* `eq` - equal to;\n* `neq` - not equal to;\n* `gt` - greater than;\n* `gteq` - greater than or equal to;\n* `lt` - lower than;\n* `lteq` - lower than or equal to;\n* `like`;\n* `notLike`.\n\n`key` and `value` may not contain underscore or comma characters." + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match the variable name provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match the variable value provided in `taskVariables` and `processVariables` case-\ninsensitively. If set to `true` **variableValue** and **variablevalue** are\ntreated as equal." + }, + "taskInvolvedUser": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks with a historic identity link to the given user." + }, + "taskInvolvedGroup": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks with a historic identity link to the given group." + }, + "taskHadCandidateUser": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks with a historic identity link to the given candidate user." + }, + "taskHadCandidateGroup": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks with a historic identity link to the given candidate group." + }, + "withCandidateGroups": { + "type": "boolean", + "nullable": true, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + "withoutCandidateGroups": { + "type": "boolean", + "nullable": true, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + "orQueries": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/HistoricTaskInstanceQueryDto" + }, + "description": "A JSON array of nested historic task instance queries with OR semantics.\n\nA task instance matches a nested query if it fulfills at least one of the query\u0027s predicates.\n\nWith multiple nested queries, a task instance must fulfill at least one predicate of each query\n([Conjunctive Normal Form](https://en.wikipedia.org/wiki/Conjunctive_normal_form)).\n\nAll task instance query properties can be used except for: `sorting`, `withCandidateGroups`, ` withoutCandidateGroups`.\n\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-engine-api/#or-queries) for more information about OR queries." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Sorting has no effect for `count` endpoints", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "taskId", + "activityInstanceId", + "processDefinitionId", + "processInstanceId", + "executionId", + "duration", + "endTime", + "startTime", + "taskName", + "taskDescription", + "assignee", + "owner", + "dueDate", + "followUpDate", + "deleteReason", + "taskDefinitionKey", + "priority", + "caseDefinitionId", + "caseInstanceId", + "caseExecutionId", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoricTaskInstanceReportResultDto": { + "type": "object", + "properties": { + "taskName": { + "type": "string", + "nullable": true, + "description": "The name of the task. It is only available when the `groupBy` parameter is set to `taskName`.\nElse the value is `null`.\n\n**Note:** This property is only set for a historic task report object.\nIn these cases, the value of the `reportType` query parameter is `count`." + }, + "count": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The number of tasks which have the given definition.\n\n**Note:** This property is only set for a historic task report object.\nIn these cases, the value of the `reportType` query parameter is `count`." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition.\n\n**Note:** This property is only set for a historic task report object.\nIn these cases, the value of the `reportType` query parameter is `count`." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition.\n\n**Note:** This property is only set for a historic task report object.\nIn these cases, the value of the `reportType` query parameter is `count`." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "The name of the process definition.\n\n**Note:** This property is only set for a historic task report object.\nIn these cases, the value of the `reportType` query parameter is `count`." + }, + "period": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Specifies a span of time within a year.\n**Note:** The period must be interpreted in conjunction with the returned `periodUnit`.\n\n**Note:** This property is only set for a duration report object.\nIn these cases, the value of the `reportType` query parameter is `duration`." + }, + "periodUnit": { + "type": "string", + "nullable": true, + "enum": [ + "MONTH", + "QUARTER" + ], + "description": "The unit of the given period. Possible values are `MONTH` and `QUARTER`.\n\n**Note:** This property is only set for a duration report object.\nIn these cases, the value of the `reportType` query parameter is `duration`." + }, + "minimum": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The smallest duration in milliseconds of all completed process instances which\nwere started in the given period.\n\n**Note:** This property is only set for a duration report object.\nIn these cases, the value of the `reportType` query parameter is `duration`." + }, + "maximum": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The greatest duration in milliseconds of all completed process instances which were\nstarted in the given period.\n\n**Note:** This property is only set for a duration report object.\nIn these cases, the value of the `reportType` query parameter is `duration`." + }, + "average": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The average duration in milliseconds of all completed process instances which were\nstarted in the given period.\n\n**Note:** This property is only set for a duration report object.\nIn these cases, the value of the `reportType` query parameter is `duration`." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant." + } + } + }, + "HistoricVariableInstanceDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the variable instance." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the variable instance." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition the variable instance belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the variable instance belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id the variable instance belongs to." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution id the variable instance belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance in which the variable is valid." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the case definition the variable instance belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the case definition the variable instance belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The case instance id the variable instance belongs to." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "The case execution id the variable instance belongs to." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task the variable instance belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant that this variable instance belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message in case a Java Serialized Object could not be de-serialized." + }, + "state": { + "type": "string", + "nullable": true, + "description": "The current state of the variable. Can be \u0027CREATED\u0027 or \u0027DELETED\u0027." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time the variable was inserted. [Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the variable should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/) `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this variable." + } + } + }, + { + "$ref": "#/components/schemas/VariableValueDto" + } + ] + }, + "HistoricVariableInstanceQueryDto": { + "type": "object", + "description": "A Historic Variable Instance instance query which defines a list of Historic Variable Instance instances", + "properties": { + "variableName": { + "type": "string", + "nullable": true, + "description": "Filter by variable name." + }, + "variableNameLike": { + "type": "string", + "nullable": true, + "description": "Restrict to variables with a name like the parameter." + }, + "variableValue": { + "type": "object", + "description": "Filter by variable value. May be `String`, `Number` or `Boolean`." + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match the variable name provided in `variableName` and `variableNameLike` case-\ninsensitively. If set to `true` **variableName** and **variablename** are\ntreated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match the variable value provided in `variableValue` case-insensitively. If set to `true`\n**variableValue** and **variablevalue** are treated as equal." + }, + "variableTypeIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated variable types. A list of all supported variable types can be found\n[here](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#supported-variable-values).\n**Note:** All non-primitive variables are associated with the type\n\u0027serializable\u0027." + }, + "includeDeleted": { + "type": "boolean", + "nullable": true, + "description": "Include variables that has already been deleted during the execution." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the process instance the variable belongs to." + }, + "processInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed process instance ids." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the process definition the variable belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by a key of the process definition the variable belongs to." + }, + "executionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and execution ids." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by the case instance the variable belongs to." + }, + "caseExecutionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and case execution ids." + }, + "caseActivityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and case activity ids." + }, + "taskIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and task ids." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and activity instance ids." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed and comma-\nseparated tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include historic variable instances that belong to no tenant. Value may only be\n`true`, as `false` is the default behavior." + }, + "variableNameIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include historic variable instances which belong to one of the passed variable names." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Sorting has no effect for `count` endpoints", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "instanceId", + "variableName", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "HistoryCleanupConfigurationDto": { + "type": "object", + "properties": { + "batchWindowStartTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Start time of the current or next batch window. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "batchWindowEndTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "End time of the current or next batch window. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`,\ne.g., `2013-01-23T14:42:45.000+0200`." + }, + "enabled": { + "type": "boolean", + "nullable": true, + "description": "Indicates whether the engine node participates in history cleanup or\nnot. The default is `true`. Participation can be disabled via\n[Process Engine Configuration](https://docs.camunda.org/manual/7.22/reference/deployment-descriptors/tags/process-engine/#history-cleanup-enabled).\n\nFor more details, see\n[Cleanup Execution Participation per Node](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#cleanup-execution-participation-per-node)." + } + } + }, + "HistoryTimeToLiveDto": { + "type": "object", + "properties": { + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0, + "description": "New value for historyTimeToLive field of the definition.\nCan be `null` if `enforceHistoryTimeToLive` is configured to `false`.\nCannot be negative." + } + } + }, + "IdentityLinkDto": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user participating in this link. Either `userId` or `groupId` is set." + }, + "groupId": { + "type": "string", + "nullable": true, + "description": "The id of the group participating in this link. Either `groupId` or `userId` is set." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The type of the identity link. The value of the this property can be user-defined. The Process Engine\nprovides three pre-defined Identity Link `type`s:\n\n* `candidate`\n* `assignee` - reserved for the task assignee\n* `owner` - reserved for the task owner\n\n**Note**: When adding or removing an Identity Link, the `type` property must be defined." + } + } + }, + "IdentityServiceGroupDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the group." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the group." + } + } + }, + "IdentityServiceGroupInfoDto": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/IdentityServiceGroupDto" + }, + "description": "An array of group objects." + }, + "groupUsers": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/IdentityServiceUserDto" + }, + "description": "An array that contains all users that are member in one of the groups." + } + } + }, + "IdentityServiceUserDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the user." + }, + "firstName": { + "type": "string", + "nullable": true, + "description": "The firstname of the user." + }, + "lastName": { + "type": "string", + "nullable": true, + "description": "The lastname of the user." + }, + "displayName": { + "type": "string", + "nullable": true, + "description": "The displayName is generated from the id or firstName and lastName if available." + } + } + }, + "IncidentDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the incident." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition this incident is associated with." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance this incident is associated with." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution this incident is associated with." + }, + "incidentTimestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time this incident happened. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "incidentType": { + "type": "string", + "nullable": true, + "description": "The type of incident, for example: `failedJobs` will be returned in case of an incident which identified\na failed job during the execution of a process instance. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity this incident is associated with." + }, + "failedActivityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the last exception occurred." + }, + "causeIncidentId": { + "type": "string", + "nullable": true, + "description": "The id of the associated cause incident which has been triggered." + }, + "rootCauseIncidentId": { + "type": "string", + "nullable": true, + "description": "The id of the associated root cause incident which has been triggered." + }, + "configuration": { + "type": "string", + "nullable": true, + "description": "The payload of this incident." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant this incident is associated with." + }, + "incidentMessage": { + "type": "string", + "nullable": true, + "description": "The message of this incident." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id the incident is associated with." + }, + "annotation": { + "type": "string", + "nullable": true, + "description": "The annotation set to the incident." + } + } + }, + "IncidentStatisticsResultDto": { + "type": "object", + "properties": { + "incidentType": { + "type": "string", + "nullable": true, + "description": "The type of the incident the number of incidents is aggregated for.\nSee the [User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/incidents/#incident-types) for a list of incident types." + }, + "incidentCount": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The total number of incidents for the corresponding incident type." + } + } + }, + "JobConditionQueryParameterDto": { + "type": "object", + "properties": { + "operator": { + "type": "string", + "nullable": true, + "enum": [ + "gt", + "lt" + ], + "description": "Comparison operator to be used." + }, + "value": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Date value to compare with." + } + } + }, + "JobDefinitionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the job definition." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition this job definition is associated with." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition this job definition is associated with." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity this job definition is associated with." + }, + "jobType": { + "type": "string", + "nullable": true, + "description": "The type of the job which is running for this job definition. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job types." + }, + "jobConfiguration": { + "type": "string", + "nullable": true, + "description": "The configuration of a job definition provides details about the jobs which will be\ncreated. For example: for timer jobs it is the timer configuration." + }, + "overridingJobPriority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The execution priority defined for jobs that are created based on this definition.\nMay be `null` when the priority has not been overridden on the job\ndefinition level." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Indicates whether this job definition is suspended or not." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant this job definition is associated with." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The id of the deployment this job definition is related to. In a deployment-aware\nsetup, this leads to all jobs of the same definition being executed\non the same node." + } + } + }, + "JobDefinitionPriorityDto": { + "type": "object", + "properties": { + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The new execution priority number for jobs of the given definition. The\ndefinition\u0027s priority can be reset by using the value `null`. In\nthat case, the job definition\u0027s priority no longer applies but a new\njob\u0027s priority is determined as specified in the process model." + }, + "includeJobs": { + "type": "boolean", + "nullable": true, + "description": "A boolean value indicating whether existing jobs of the given definition should\nreceive the priority as well. Default value is `false`. Can only be\n`true` when the __priority__ parameter is not `null`." + } + } + }, + "JobDefinitionQueryDto": { + "type": "object", + "description": "A Job definition query which defines a list of Job definitions", + "properties": { + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by job definition id." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed activity ids." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Only include job definitions which exist for the given process definition id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Only include job definitions which exist for the given process definition key." + }, + "jobType": { + "type": "string", + "nullable": true, + "description": "Only include job definitions which exist for the given job type. See the\n[User Guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/the-job-executor/#job-creation)\nfor more information about job types." + }, + "jobConfiguration": { + "type": "string", + "nullable": true, + "description": "Only include job definitions which exist for the given job configuration. For example: for\ntimer jobs it is the timer configuration." + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Only include active job definitions. Value may only be `true`, as `false` is the default\nbehavior." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Only include suspended job definitions. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "withOverridingJobPriority": { + "type": "boolean", + "nullable": true, + "description": "Only include job definitions that have an overriding job priority defined. The only\neffective value is `true`. If set to `false`, this filter is not applied." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include job definitions which belong to one of the passed tenant\nids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include job definitions which belong to no tenant. Value may only be `true`, as\n`false` is the default behavior." + }, + "includeJobDefinitionsWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Include job definitions which belong to no tenant. Can be used in combination with\n`tenantIdIn`. Value may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Sorting has no effect for `count` endpoints.", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "jobDefinitionId", + "activityId", + "processDefinitionId", + "processDefinitionKey", + "jobType", + "jobConfiguration", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "JobDefinitionSuspensionStateDto": { + "allOf": [ + { + "type": "object", + "properties": { + "includeJobs": { + "type": "boolean", + "nullable": true, + "description": "A `Boolean` value which indicates whether to activate or suspend also all jobs of\nthe referenced job definitions. When the value is set to `true`, all jobs\nof the provided job definitions will be activated or suspended and\nwhen the value is set to `false`, the suspension state of all jobs\nof the provided job definitions will not be updated." + }, + "executionDate": { + "type": "string", + "nullable": true, + "description": "The date on which the referenced job definitions will be activated or suspended. If null,\nthe suspension state of the given job definitions is updated\nimmediately. By [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-\ndd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + } + } + }, + { + "$ref": "#/components/schemas/SuspensionStateDto" + } + ] + }, + "JobDefinitionsSuspensionStateDto": { + "allOf": [ + { + "type": "object", + "description": "Defines by which selection criterion to activate or suspend job definitions.\nThe selection criteria are mutually exclusive and can only be one of:\n* `processDefinitionId`\n* `processDefinitionKey`", + "properties": { + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The process definition id of the job definitions to activate or suspend." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The process definition key of the job definitions to activate or suspend." + }, + "processDefinitionTenantId": { + "type": "string", + "nullable": true, + "description": "Only activate or suspend job definitions of a process definition which belongs to a\ntenant with the given id.\n\nNote that this parameter will only be considered \nin combination with `processDefinitionKey`." + }, + "processDefinitionWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only activate or suspend job definitions of a process definition which belongs to\nno tenant. Value may only be `true`, as `false` is the default\nbehavior.\n\nNote that this parameter will only be considered \nin combination with `processDefinitionKey`." + } + } + }, + { + "$ref": "#/components/schemas/JobDefinitionSuspensionStateDto" + } + ] + }, + "JobDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the job." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the associated job definition." + }, + "dueDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date on which this job is supposed to be processed." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance which execution created the job." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The specific execution id on which the job was created." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition which this job belongs to." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition which this job belongs to." + }, + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries this job has left." + }, + "exceptionMessage": { + "type": "string", + "nullable": true, + "description": "The message of the exception that occurred, the last time the job was executed. Is\nnull when no exception occurred." + }, + "failedActivityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity on which the last exception occurred, the last time the job\nwas executed. Is null when no exception occurred." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether the job is suspended or not." + }, + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The job\u0027s priority for execution." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant which this job belongs to." + }, + "createTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date on which this job has been created." + }, + "batchId": { + "type": "string", + "nullable": true, + "description": "The ID of the batch associated with this job. `null` if no batch is associated with this job. The\nfollowing jobs are associated with batches:\n* Seed Jobs\n* Monitor Jobs\n* Batch Execution Jobs" + } + } + }, + "JobDuedateDto": { + "type": "object", + "properties": { + "duedate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date to set when the job has the next execution." + }, + "cascade": { + "type": "boolean", + "nullable": true, + "description": "A boolean value to indicate if modifications to the due date should cascade to\nsubsequent jobs. (e.g. Modify the due date of a timer by +15\nminutes. This flag indicates if a +15 minutes should be applied to all\nsubsequent timers.) This flag only affects timer jobs and only works if due date\nis not null. Default: `false`" + } + } + }, + "JobQueryDto": { + "type": "object", + "description": "A Job instance query which defines a list of Job instances", + "properties": { + "jobId": { + "type": "string", + "nullable": true, + "description": "Filter by job id." + }, + "jobIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of job ids." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "Only select jobs which exist for the given job definition." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Only select jobs which exist for the given process instance." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only select jobs which exist for the given list of process instance ids." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Only select jobs which exist for the given execution." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the id of the process definition the jobs run on." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the process definition the jobs run on." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Only select jobs which exist for an activity with the given id." + }, + "withRetriesLeft": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs which have retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "executable": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs which are executable, i.e., retries \u003e 0 and due date is `null` or due\ndate is in the past. Value may only be `true`, as `false` is the default\nbehavior." + }, + "timers": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs that are timers. Cannot be used together with `messages`. Value may only\nbe `true`, as `false` is the default behavior." + }, + "messages": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs that are messages. Cannot be used together with `timers`. Value may only\nbe `true`, as `false` is the default behavior." + }, + "dueDates": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/JobConditionQueryParameterDto" + }, + "description": "Only select jobs where the due date is lower or higher than the given date.\n" + }, + "createTimes": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/JobConditionQueryParameterDto" + }, + "description": "Only select jobs created before or after the given date.\n" + }, + "withException": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs that failed due to an exception. Value may only be `true`, as `false` is\nthe default behavior." + }, + "exceptionMessage": { + "type": "string", + "nullable": true, + "description": "Only select jobs that failed due to an exception with the given message." + }, + "failedActivityId": { + "type": "string", + "nullable": true, + "description": "Only select jobs that failed due to an exception at an activity with the given id." + }, + "noRetriesLeft": { + "type": "boolean", + "nullable": true, + "description": "Only select jobs which have no retries left. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Only include active jobs. Value may only be `true`, as `false` is the default behavior." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Only include suspended jobs. Value may only be `true`, as `false` is the default behavior." + }, + "priorityLowerThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include jobs with a priority lower than or equal to the given value. Value must be a\nvalid `long` value." + }, + "priorityHigherThanOrEquals": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "Only include jobs with a priority higher than or equal to the given value. Value must be a\nvalid `long` value." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include jobs which belong to one of the passed tenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include jobs which belong to no tenant. Value may only be `true`, as `false` is the\ndefault behavior." + }, + "includeJobsWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Include jobs which belong to no tenant. Can be used in combination with `tenantIdIn`.\nValue may only be `true`, as `false` is the default behavior." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is\n an object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. Does not have an effect for the `count` endpoint.", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "jobId", + "executionId", + "processInstanceId", + "processDefinitionId", + "processDefinitionKey", + "jobPriority", + "jobRetries", + "jobDueDate", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "JobRetriesDto": { + "allOf": [ + { + "type": "object", + "properties": { + "dueDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The due date to set for the job. A due date indicates when this job is ready for execution.\nJobs with due dates in the past will be scheduled for execution." + } + } + }, + { + "$ref": "#/components/schemas/RetriesDto" + } + ] + }, + "JobSuspensionStateDto": { + "allOf": [ + { + "type": "object", + "description": "Defines by which selection criterion to activate or suspend jobs.\nThis selection criterion are mutually exclusive and can only be on of:\n* `jobDefinitionId`\n* `processDefinitionId`\n* `processInstanceId`\n* `processDefinitionKey`", + "properties": { + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "The job definition id of the jobs to activate or suspend." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The process definition id of the jobs to activate or suspend." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the jobs to activate or suspend." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The process definition key of the jobs to activate or suspend." + }, + "processDefinitionTenantId": { + "type": "string", + "nullable": true, + "description": "Only activate or suspend jobs of a process definition which belongs to a tenant\nwith the given id. Works only when selecting with `processDefinitionKey`." + }, + "processDefinitionWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only activate or suspend jobs of a process definition which belongs to no tenant.\nValue may only be `true`, as `false` is the default behavior. Works only when selecting with `processDefinitionKey`." + } + } + }, + { + "$ref": "#/components/schemas/SuspensionStateDto" + } + ] + }, + "LinkableDto": { + "type": "object", + "properties": { + "links": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/AtomLink" + }, + "description": "The links associated to this resource, with `method`, `href` and `rel`." + } + } + }, + "LockExternalTaskDto": { + "allOf": [ + { + "type": "object", + "properties": { + "lockDuration": { + "type": "integer", + "format": "int64", + "description": "The duration to lock the external task for in milliseconds.\n**Note:** Attempting to lock an already locked external task with the same `workerId`\nwill succeed and a new lock duration will be set, starting from the current moment." + } + } + }, + { + "$ref": "#/components/schemas/HandleExternalTaskDto" + } + ] + }, + "LockedExternalTaskDto": { + "title": "LockedExternalTaskDto", + "type": "object", + "properties": { + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this external task belongs to." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance that the external task belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "The full error message submitted with the latest reported failure executing this task;`null` if no failure\nwas reported previously or if no error message was submitted" + }, + "errorDetails": { + "type": "string", + "nullable": true, + "description": "The error details submitted with the latest reported failure executing this task.`null` if no failure was\nreported previously or if no error details was submitted" + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution that the external task belongs to." + }, + "id": { + "type": "string", + "nullable": true, + "description": "The id of the external task." + }, + "lockExpirationTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date that the task\u0027s most recent lock expires or has expired." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the external task is defined in." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definition the external task is defined in." + }, + "processDefinitionVersionTag": { + "type": "string", + "nullable": true, + "description": "The version tag of the process definition the external task is defined in." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the external task belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant the external task belongs to." + }, + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries the task currently has left." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Whether the process instance the external task belongs to is suspended." + }, + "workerId": { + "type": "string", + "nullable": true, + "description": "The id of the worker that posesses or posessed the most recent lock." + }, + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The priority of the external task." + }, + "topicName": { + "type": "string", + "nullable": true, + "description": "The topic name of the external task." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key of the process instance the external task belongs to." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing a property for each of the requested variables. The key is the variable name,\nthe value is a JSON object of serialized variable values with the following properties:" + } + } + }, + "MessageCorrelationResultWithVariableDto": { + "type": "object", + "description": "The `processInstance` property only has a value if the resultType is set to `ProcessDefinition`.\nThe processInstance with the properties as described in the\n[get single instance](https://docs.camunda.org/manual/7.22/reference/rest/process-instance/get/) method.\n\nThe `execution` property only has a value if the resultType is set to `Execution`.\nThe execution with the properties as described in the\n[get single execution](https://docs.camunda.org/manual/7.22/reference/rest/execution/get/) method.", + "properties": { + "resultType": { + "type": "string", + "nullable": true, + "enum": [ + "Execution", + "ProcessDefinition" + ], + "description": "Indicates if the message was correlated to a message start event or an \nintermediate message catching event. In the first case, the resultType is \n`ProcessDefinition` and otherwise `Execution`." + }, + "processInstance": { + "$ref": "#/components/schemas/ProcessInstanceDto" + }, + "execution": { + "$ref": "#/components/schemas/ExecutionDto" + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "This property is returned if the `variablesInResultEnabled` is set to `true`.\nContains a list of the process variables. " + } + } + }, + "MetricsIntervalResultDto": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The interval timestamp." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the metric." + }, + "reporter": { + "type": "string", + "nullable": true, + "description": "The reporter of the metric. `null` if the metrics are aggregated by reporter." + }, + "value": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The value of the metric aggregated by the interval." + } + } + }, + "MetricsResultDto": { + "type": "object", + "properties": { + "result": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The current sum (count) for the selected metric." + } + } + }, + "MigrationExecutionDto": { + "type": "object", + "properties": { + "migrationPlan": { + "$ref": "#/components/schemas/MigrationPlanDto" + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids to migrate." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "A boolean value to control whether execution listeners should be invoked during\nmigration." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "A boolean value to control whether input/output mappings should be executed during\nmigration." + } + } + }, + "MigrationInstructionDto": { + "type": "object", + "properties": { + "sourceActivityIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The activity ids from the source process definition being mapped." + }, + "targetActivityIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The activity ids from the target process definition being mapped." + }, + "updateEventTrigger": { + "type": "boolean", + "nullable": true, + "description": "Configuration flag whether event triggers defined are going to be updated during migration." + } + } + }, + "MigrationInstructionValidationReportDto": { + "type": "object", + "properties": { + "instruction": { + "$ref": "#/components/schemas/MigrationInstructionDto" + }, + "failures": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of instruction validation report messages." + } + } + }, + "MigrationPlanDto": { + "type": "object", + "properties": { + "sourceProcessDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the source process definition for the migration." + }, + "targetProcessDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the target process definition for the migration." + }, + "instructions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/MigrationInstructionDto" + }, + "description": "A list of migration instructions which map equal activities. Each\nmigration instruction is a JSON object with the following properties:" + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of variables which will be set into the process instances\u0027 scope.\nEach key is a variable name and each value a JSON variable value object." + } + } + }, + "MigrationPlanGenerationDto": { + "type": "object", + "properties": { + "sourceProcessDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the source process definition for the migration." + }, + "targetProcessDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the target process definition for the migration." + }, + "updateEventTriggers": { + "type": "boolean", + "nullable": true, + "description": "A boolean flag indicating whether instructions between events should be configured\nto update the event triggers." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A map of variables which will be set into the process instances\u0027 scope.\nEach key is a variable name and each value a JSON variable value object." + } + } + }, + "MigrationPlanReportDto": { + "type": "object", + "properties": { + "instructionReports": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/MigrationInstructionValidationReportDto" + }, + "description": "The list of instruction validation reports. If no validation\nerrors are detected it is an empty list." + }, + "variableReports": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/MigrationVariableValidationReportDto" + }, + "description": "A map of variable reports.\nEach key is a variable name and each value a JSON object consisting of the variable\u0027s type, value,\nvalue info object and a list of failures." + } + } + }, + "MigrationVariableValidationReportDto": { + "allOf": [ + { + "type": "object", + "properties": { + "failures": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of variable validation report messages." + } + } + }, + { + "$ref": "#/components/schemas/VariableValueDto" + } + ] + }, + "MissingAuthorizationDto": { + "type": "object", + "properties": { + "permissionName": { + "type": "string", + "nullable": true, + "description": "The permission name that the user is missing." + }, + "resourceName": { + "type": "string", + "nullable": true, + "description": "The name of the resource that the user is missing permission for." + }, + "resourceId": { + "type": "string", + "nullable": true, + "description": "The id of the resource that the user is missing permission for." + } + } + }, + "ModificationDto": { + "type": "object", + "properties": { + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition for the modification" + }, + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "Skip execution listener invocation for activities that are started or ended as part\nof this request." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "Skip execution of [input/output variable mappings](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#input-output-variable-mapping) for\nactivities that are started or ended as part of this request." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids to modify." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "instructions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/MultipleProcessInstanceModificationInstructionDto" + }, + "description": "An array of modification instructions. The instructions are executed in the order they are in. " + }, + "annotation": { + "type": "string", + "nullable": true, + "description": "An arbitrary text annotation set by a user for auditing reasons." + } + } + }, + "MultiFormAttachmentDto": { + "type": "object", + "properties": { + "attachment-name": { + "type": "string", + "nullable": true, + "description": "The name of the attachment." + }, + "attachment-description": { + "type": "string", + "nullable": true, + "description": "The description of the attachment." + }, + "attachment-type": { + "type": "string", + "nullable": true, + "description": "The type of the attachment." + }, + "url": { + "type": "string", + "nullable": true, + "description": "The url to the remote content of the attachment." + }, + "content": { + "type": "string", + "format": "binary", + "nullable": true, + "description": "The content of the attachment." + } + } + }, + "MultiFormDeploymentDto": { + "type": "object", + "properties": { + "tenant-id": { + "type": "string", + "nullable": true, + "description": "The tenant id for the deployment to be created." + }, + "deployment-source": { + "type": "string", + "nullable": true, + "description": "The source for the deployment to be created." + }, + "deploy-changed-only": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A flag indicating whether the process engine should perform duplicate checking on a per-resource basis.\nIf set to true, only those resources that have actually changed are deployed.\nChecks are made against resources included previous deployments of the same name and source and only against the latest versions of those resources.\nIf set to true, the option enable-duplicate-filtering is overridden and set to true." + }, + "enable-duplicate-filtering": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "A flag indicating whether the process engine should perform duplicate checking for the deployment or not.\nThis allows you to check if a deployment with the same name and the same resouces already exists and\nif true, not create a new deployment but instead return the existing deployment. The default value is false." + }, + "deployment-name": { + "type": "string", + "nullable": true, + "description": "The name for the deployment to be created." + }, + "deployment-activation-time": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Sets the date on which the process definitions contained in this deployment will be activated. This means that all process\ndefinitions will be deployed as usual, but they will be suspended from the start until the given activation date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + }, + "data": { + "type": "string", + "format": "binary", + "nullable": true, + "description": "The binary data to create the deployment resource.\nIt is possible to have more than one form part with different form part names for the binary data to create a deployment." + } + } + }, + "MultiFormVariableBinaryDto": { + "type": "object", + "properties": { + "data": { + "type": "string", + "format": "binary", + "nullable": true, + "description": "The binary data to be set.\nFor File variables, this multipart can contain the filename, binary value and MIME type of the file variable to be set\nOnly the filename is mandatory." + }, + "valueType": { + "type": "string", + "nullable": true, + "enum": [ + "Bytes", + "File" + ], + "description": "The name of the variable type. Either Bytes for a byte array variable or File for a file variable." + } + } + }, + "MultipleProcessInstanceModificationInstructionDto": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "cancel", + "startBeforeActivity", + "startAfterActivity", + "startTransition" + ], + "description": "**Mandatory**. One of the following values: `cancel`, `startBeforeActivity`, `startAfterActivity`, `startTransition`.\n\n* A cancel instruction requests cancellation of a single activity instance or all instances of one activity.\n* A startBeforeActivity instruction requests to enter a given activity.\n* A startAfterActivity instruction requests to execute the single outgoing sequence flow of a given activity.\n* A startTransition instruction requests to execute a specific sequence flow." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." + }, + "transitionId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." + }, + "cancelCurrentActiveActivityInstances": { + "type": "boolean", + "nullable": true, + "description": "Can be used with instructions of type cancel. Prevents the deletion of new created activity instances." + } + } + }, + "ParseExceptionDto": { + "allOf": [ + { + "type": "object", + "properties": { + "details": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/ResourceReportDto" + }, + "description": "A JSON Object containing list of errors and warnings occurred during deployment." + } + } + }, + { + "$ref": "#/components/schemas/ExceptionDto" + } + ] + }, + "PasswordPolicyDto": { + "type": "object", + "properties": { + "rules": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/PasswordPolicyRuleDto" + }, + "description": "An array of password policy rules. Each element of the array is representing one rule of the policy." + } + } + }, + "PasswordPolicyRequestDto": { + "type": "object", + "properties": { + "password": { + "type": "string", + "nullable": true, + "description": "The candidate password to be check against the password policy." + }, + "profile": { + "$ref": "#/components/schemas/UserProfileDto" + } + } + }, + "PasswordPolicyRuleDto": { + "type": "object", + "description": "Describes a rule of a password policy.", + "properties": { + "placeholder": { + "type": "string", + "nullable": true, + "description": "A placeholder string that contains the name of a password policy rule." + }, + "parameter": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "A map that describes the characteristics of a password policy rule, such as the minimum number of digits." + } + } + }, + "PatchVariablesDto": { + "type": "object", + "properties": { + "modifications": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs." + }, + "deletions": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "An array of String keys of variables to be deleted." + } + } + }, + "PriorityDto": { + "type": "object", + "properties": { + "priority": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "The priority of the resource." + } + } + }, + "ProblemDto": { + "type": "object", + "properties": { + "message": { + "type": "string", + "nullable": true, + "description": "The message of the problem." + }, + "line": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The line where the problem occurred." + }, + "column": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The column where the problem occurred." + }, + "mainElementId": { + "type": "string", + "nullable": true, + "description": "The main element id where the problem occurred." + }, + "elementIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of element id affected by the problem." + } + } + }, + "ProcessDefinitionDiagramDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the process definition." + }, + "bpmn20Xml": { + "type": "string", + "nullable": true, + "description": "An escaped XML string containing the XML that this definition was deployed with.\nCarriage returns, line feeds and quotation marks are escaped." + } + } + }, + "ProcessDefinitionDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the process definition" + }, + "key": { + "type": "string", + "nullable": true, + "description": "The key of the process definition, i.e., the id of the BPMN 2.0 XML process definition." + }, + "category": { + "type": "string", + "nullable": true, + "description": "The category of the process definition." + }, + "description": { + "type": "string", + "nullable": true, + "description": "The description of the process definition." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the process definition." + }, + "version": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The version of the process definition that the engine assigned to it." + }, + "resource": { + "type": "string", + "nullable": true, + "description": "The file name of the process definition." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "The deployment id of the process definition." + }, + "diagram": { + "type": "string", + "nullable": true, + "description": "The file name of the process definition diagram, if it exists." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether the definition is suspended or not." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the process definition." + }, + "versionTag": { + "type": "string", + "nullable": true, + "description": "The version tag of the process definition." + }, + "historyTimeToLive": { + "type": "integer", + "format": "int32", + "nullable": true, + "minimum": 0, + "description": "History time to live value of the process definition.\nIs used within [History cleanup](https://docs.camunda.org/manual/7.22/user-guide/process-engine/history/#history-cleanup)." + }, + "startableInTasklist": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether the process definition is startable in Tasklist or not." + } + } + }, + "ProcessDefinitionStatisticsResultDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the results are aggregated for." + }, + "instances": { + "type": "integer", + "format": "int32", + "description": "The total number of running process instances of this process definition." + }, + "failedJobs": { + "type": "integer", + "format": "int32", + "description": "The total number of failed jobs for the running instances.\n**Note**: Will be `0` (not `null`), if failed jobs were excluded." + }, + "incidents": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/IncidentStatisticsResultDto" + }, + "description": "Each item in the resulting array is an object which contains `incidentType` and `incidentCount`.\n**Note**: Will be an empty array, if `incidents` or `incidentsForType` were excluded.\nFurthermore, the array will be also empty if no incidents were found." + }, + "@class": { + "type": "string", + "nullable": true, + "description": "The fully qualified class name of the data transfer object class.\nThe class name might change in future releases." + }, + "definition": { + "$ref": "#/components/schemas/ProcessDefinitionDto" + } + } + }, + "ProcessDefinitionSuspensionStateDto": { + "type": "object", + "properties": { + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A `Boolean` value which indicates whether to activate or suspend all process definitions with the given key.\nWhen the value is set to `true`, all process definitions with the given key will be suspended and\nwhen the value is set to `false`, all process definitions with the given key will be activated." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definitions to activate or suspend." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The key of the process definitions to activate or suspend." + }, + "includeProcessInstances": { + "type": "boolean", + "nullable": true, + "description": "A `Boolean` value which indicates whether to activate or suspend also all process instances of \nthe process definitions with the given key.\nWhen the value is set to `true`, all process instances of the process definitions with the given key\nwill be activated or suspended and when the value is set to `false`, the suspension state of \nall process instances of the process definitions with the given key will not be updated." + }, + "executionDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date on which all process definitions with the given key will be activated or suspended.\nIf `null`, the suspension state of all process definitions with the given key is updated immediately.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/),\nthe date must have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`." + } + } + }, + "ProcessEngineDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "The name of the process engine." + } + } + }, + "ProcessInstanceDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the process instance." + }, + "definitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this process instance belongs to." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key of the process instance." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance associated with the process instance." + }, + "ended": { + "type": "boolean", + "nullable": true, + "deprecated": true, + "description": "A flag indicating whether the process instance has ended or not. Deprecated: will always be false!" + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A flag indicating whether the process instance is suspended or not." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The tenant id of the process instance." + } + } + }, + { + "$ref": "#/components/schemas/LinkableDto" + } + ] + }, + "ProcessInstanceModificationDto": { + "type": "object", + "properties": { + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "Skip execution listener invocation for activities that are started or ended as part of this request." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "Skip execution of [input/output variable mappings](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#input-output-variable-mapping)\nfor activities that are started or ended as part of this request." + }, + "instructions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProcessInstanceModificationInstructionDto" + }, + "description": "JSON array of modification instructions. The instructions are executed in the order they are in." + }, + "annotation": { + "type": "string", + "nullable": true, + "description": "An arbitrary text annotation set by a user for auditing reasons." + } + } + }, + "ProcessInstanceModificationInstructionDto": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "cancel", + "startBeforeActivity", + "startAfterActivity", + "startTransition" + ], + "description": "**Mandatory**. One of the following values: `cancel`, `startBeforeActivity`, `startAfterActivity`, `startTransition`.\n\n* A cancel instruction requests cancellation of a single activity instance or all instances of one activity.\n* A startBeforeActivity instruction requests to enter a given activity.\n* A startAfterActivity instruction requests to execute the single outgoing sequence flow of a given activity.\n* A startTransition instruction requests to execute a specific sequence flow." + }, + "variables": { + "$ref": "#/components/schemas/TriggerVariableValueDto" + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." + }, + "transitionId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of types `startTransition`. Specifies the sequence flow to start." + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of type `cancel`. Specifies the activity instance to cancel.\nValid values are the activity instance IDs supplied by the [Get Activity Instance request](https://docs.camunda.org/manual/7.22/reference/rest/process-instance/get-activity-instances/)." + }, + "transitionInstanceId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of type `cancel`. Specifies the transition instance to cancel.\nValid values are the transition instance IDs supplied by the [Get Activity Instance request](https://docs.camunda.org/manual/7.22/reference/rest/process-instance/get-activity-instances/)." + }, + "ancestorActivityInstanceId": { + "type": "string", + "nullable": true, + "description": "Can be used with instructions of type `startBeforeActivity`, `startAfterActivity`, and `startTransition`.\nValid values are the activity instance IDs supplied by the Get Activity Instance request.\nIf there are multiple parent activity instances of the targeted activity,\nthis specifies the ancestor scope in which hierarchy the activity/transition is to be instantiated.\n\nExample: When there are two instances of a subprocess and an activity contained in the subprocess is to be started,\nthis parameter allows to specifiy under which subprocess instance the activity should be started." + }, + "cancelCurrentActiveActivityInstances": { + "type": "boolean", + "nullable": true, + "description": "Can be used with instructions of type cancel. Prevents the deletion of new created activity instances." + } + } + }, + "ProcessInstanceQueryDto": { + "type": "object", + "description": "A process instance query which defines a group of process instances", + "properties": { + "deploymentId": { + "type": "string", + "nullable": true, + "description": "Filter by the deployment the id belongs to." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Filter by the process definition the instances run on." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Filter by the key of the process definition the instances run on." + }, + "processDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of process definition keys.\nA process instance must have one of the given process definition keys. Must be a JSON array of Strings." + }, + "processDefinitionKeyNotIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Exclude instances by a list of process definition keys.\nA process instance must not have one of the given process definition keys. Must be a JSON array of Strings." + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key." + }, + "businessKeyLike": { + "type": "string", + "nullable": true, + "description": "Filter by process instance business key that the parameter is a substring of." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Filter by case instance id." + }, + "superProcessInstance": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that are sub process instances of the given process instance.\nTakes a process instance id." + }, + "subProcessInstance": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that have the given process instance as a sub process instance.\nTakes a process instance id." + }, + "superCaseInstance": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that are sub process instances of the given case instance.\nTakes a case instance id." + }, + "subCaseInstance": { + "type": "string", + "nullable": true, + "description": "Restrict query to all process instances that have the given case instance as a sub case instance.\nTakes a case instance id." + }, + "active": { + "type": "boolean", + "nullable": true, + "description": "Only include active process instances. Value may only be true, as false is the default behavior." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Only include suspended process instances. Value may only be true, as false is the default behavior." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of process instance ids. Must be a JSON array of Strings." + }, + "withIncident": { + "type": "boolean", + "nullable": true, + "description": "Filter by presence of incidents. Selects only process instances that have an incident." + }, + "incidentId": { + "type": "string", + "nullable": true, + "description": "Filter by the incident id." + }, + "incidentType": { + "type": "string", + "nullable": true, + "description": "Filter by the incident type. See the User Guide for a list of incident types." + }, + "incidentMessage": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message. Exact match." + }, + "incidentMessageLike": { + "type": "string", + "nullable": true, + "description": "Filter by the incident message that the parameter is a substring of." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of tenant ids. A process instance must have one of the given tenant ids.\nMust be a JSON array of Strings." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include process instances which belong to no tenant.\nValue may only be true, as false is the default behavior." + }, + "processDefinitionWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only include process instances which process definition has no tenant id." + }, + "activityIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Filter by a list of activity ids.\nA process instance must currently wait in a leaf activity with one of the given activity ids." + }, + "rootProcessInstances": { + "type": "boolean", + "nullable": true, + "description": "Restrict the query to all process instances that are top level process instances." + }, + "leafProcessInstances": { + "type": "boolean", + "nullable": true, + "description": "Restrict the query to all process instances that are leaf instances. (i.e. don\u0027t have any sub instances)" + }, + "variables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "A JSON array to only include process instances that have variables with certain values.\nThe array consists of objects with the three properties `name`, `operator` and `value`.\n`name` (String) is the variable name,\n`operator` (String) is the comparison operator to be used and `value` the variable value.\nThe `value` may be String, Number or Boolean.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than;\n`gteq` - greater than or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`." + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable names in this query case-insensitively.\nIf set to true variableName and variablename are treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable values in this query case-insensitively.\nIf set to true variableValue and variablevalue are treated as equal." + }, + "orQueries": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "description": "A JSON array of nested process instance queries with OR semantics.\nA process instance matches a nested query if it fulfills at least one of the query\u0027s predicates.\nWith multiple nested queries, a process instance must fulfill at least one predicate of each query (Conjunctive Normal Form).\nAll process instance query properties can be used except for: `sorting`\nSee the [User guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-engine-api/#or-queries) for more information about OR queries." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "instanceId", + "definitionId", + "definitionKey", + "businessKey", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "ProcessInstanceSuspensionStateAsyncDto": { + "allOf": [ + { + "type": "object", + "properties": { + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids which defines a group of process instances\nwhich will be activated or suspended by the operation." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + } + } + }, + { + "$ref": "#/components/schemas/SuspensionStateDto" + } + ] + }, + "ProcessInstanceSuspensionStateDto": { + "allOf": [ + { + "type": "object", + "properties": { + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The process definition id of the process instances to activate or suspend.\n\n**Note**: This parameter can be used only with combination of `suspended`." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The process definition key of the process instances to activate or suspend.\n\n**Note**: This parameter can be used only with combination of `suspended`, `processDefinitionTenantId`, and `processDefinitionWithoutTenantId`." + }, + "processDefinitionTenantId": { + "type": "string", + "nullable": true, + "description": "Only activate or suspend process instances of a process definition which belongs to a tenant with the given id.\n\n**Note**: This parameter can be used only with combination of `suspended`, `processDefinitionKey`, and `processDefinitionWithoutTenantId`." + }, + "processDefinitionWithoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "Only activate or suspend process instances of a process definition which belongs to no tenant.\nValue may only be true, as false is the default behavior.\n\n**Note**: This parameter can be used only with combination of `suspended`, `processDefinitionKey`, and `processDefinitionTenantId`." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids which defines a group of process instances\nwhich will be activated or suspended by the operation.\n\n**Note**: This parameter can be used only with combination of `suspended`, `processInstanceQuery`, and `historicProcessInstanceQuery`." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + } + } + }, + { + "$ref": "#/components/schemas/SuspensionStateDto" + } + ] + }, + "ProcessInstanceWithVariablesDto": { + "allOf": [ + { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "The id of the process instance." + } + } + }, + { + "$ref": "#/components/schemas/ProcessInstanceDto" + } + ] + }, + "RedeploymentDto": { + "title": "RedeploymentDto", + "type": "object", + "description": "A JSON object with the following properties:", + "properties": { + "resourceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of deployment resource ids to re-deploy." + }, + "resourceNames": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of deployment resource names to re-deploy." + }, + "source": { + "type": "string", + "nullable": true, + "description": "Sets the source of the deployment." + } + } + }, + "ResourceOptionsDto": { + "allOf": [ + { + "type": "object", + "properties": {} + }, + { + "$ref": "#/components/schemas/LinkableDto" + } + ] + }, + "ResourceReportDto": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProblemDto" + }, + "description": "A list of errors occurred during parsing." + }, + "warnings": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProblemDto" + }, + "description": "A list of warnings occurred during parsing." + } + } + }, + "RestartProcessInstanceDto": { + "type": "object", + "properties": { + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids to restart." + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "Skip execution listener invocation for activities that are started as part of this request." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "Skip execution of\n[input/output variable mappings](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#input-output-variable-mapping)\nfor activities that are started as part of this request." + }, + "initialVariables": { + "type": "boolean", + "nullable": true, + "description": "Set the initial set of variables during restart. By default, the last set of variables is used." + }, + "withoutBusinessKey": { + "type": "boolean", + "nullable": true, + "description": "Do not take over the business key of the historic process instance." + }, + "instructions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/RestartProcessInstanceModificationInstructionDto" + }, + "description": "**Optional**. A JSON array of instructions that specify which activities to start the process instance at.\nIf this property is omitted, the process instance starts at its default blank start event." + } + } + }, + "RestartProcessInstanceModificationInstructionDto": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "startBeforeActivity", + "startAfterActivity", + "startTransition" + ], + "description": "**Mandatory**. One of the following values: `startBeforeActivity`, `startAfterActivity`, `startTransition`.\n\n* A `startBeforeActivity` instruction requests to enter a given activity.\n* A `startAfterActivity` instruction requests to execute the single outgoing sequence flow of a given activity.\n* A `startTransition` instruction requests to execute a specific sequence flow." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "**Can be used with instructions of types** `startBeforeActivity`\nand `startAfterActivity`. Specifies the sequence flow to start." + }, + "transitionId": { + "type": "string", + "nullable": true, + "description": "**Can be used with instructions of types** `startTransition`.\nSpecifies the sequence flow to start." + } + } + }, + "RetriesDto": { + "type": "object", + "properties": { + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries to set for the resource. Must be \u003e\u003d 0. If this is 0, an incident is created\nand the task, or job, cannot be fetched, or acquired anymore unless the retries are increased again.\nCan not be null." + } + } + }, + "SchemaLogEntryDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the schema log entry." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date and time of the schema update." + }, + "version": { + "type": "string", + "nullable": true, + "description": "The version of the schema." + } + } + }, + "SchemaLogQueryDto": { + "type": "object", + "properties": { + "version": { + "type": "string", + "nullable": true, + "description": "The version of the schema." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "A JSON array of criteria to sort the result by. Each element of the array is\n a JSON object that specifies one ordering. The position in the array\n identifies the rank of an ordering, i.e., whether it is primary, secondary,\n etc. ", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "timestamp" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "SetJobRetriesByProcessDto": { + "allOf": [ + { + "type": "object", + "properties": { + "processInstances": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids to fetch jobs, for which retries will be set." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + } + } + }, + { + "$ref": "#/components/schemas/SetJobRetriesDto" + } + ] + }, + "SetJobRetriesDto": { + "allOf": [ + { + "type": "object", + "description": "Defines the number of retries for a selection of jobs.\nPlease note that if both jobIds and jobQuery are provided,\nthen retries will be set on the union of these sets.", + "properties": { + "jobIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of job ids to set retries for." + }, + "jobQuery": { + "$ref": "#/components/schemas/JobQueryDto" + } + } + }, + { + "$ref": "#/components/schemas/JobRetriesDto" + } + ] + }, + "SetRemovalTimeToHistoricBatchesDto": { + "allOf": [ + { + "type": "object", + "properties": { + "historicBatchQuery": { + "type": "object", + "nullable": true, + "description": "Query for the historic batches to set the removal time for." + }, + "historicBatchIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The ids of the historic batches to set the removal time for." + } + } + }, + { + "$ref": "#/components/schemas/AbstractSetRemovalTimeDto" + } + ] + }, + "SetRemovalTimeToHistoricDecisionInstancesDto": { + "allOf": [ + { + "type": "object", + "properties": { + "hierarchical": { + "type": "boolean", + "nullable": true, + "description": "Sets the removal time to all historic decision instances in the hierarchy.\nValue may only be `true`, as `false` is the default behavior." + }, + "historicDecisionInstanceQuery": { + "$ref": "#/components/schemas/HistoricDecisionInstanceQueryDto" + }, + "historicDecisionInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The ids of the historic decision instances to set the removal time for." + } + } + }, + { + "$ref": "#/components/schemas/AbstractSetRemovalTimeDto" + } + ] + }, + "SetRemovalTimeToHistoricProcessInstancesDto": { + "allOf": [ + { + "type": "object", + "properties": { + "historicProcessInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The id of the process instance." + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "hierarchical": { + "type": "boolean", + "nullable": true, + "description": "Sets the removal time to all historic process instances in the hierarchy.\nValue may only be `true`, as `false` is the default behavior." + }, + "updateInChunks": { + "type": "boolean", + "nullable": true, + "description": "Handles removal time updates in chunks, taking into account the defined size in\n`removalTimeUpdateChunkSize` in the process engine configuration. The size of the \nchunks can also be overridden per call with the `updateChunkSize` parameter.\nEnabling this option can lead to multiple executions of the resulting jobs, preventing\nthe database transaction from timing out by limiting the number of rows to update.\nValue may only be `true`, as `false` is the default behavior." + }, + "updateChunkSize": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Defines the size of the chunks in which removal time updates are processed.\nThe value must be a positive integer between `1` and `500`. This only has an \neffect if `updateInChunks` is set to `true`. If undefined, the operation uses the \n`removalTimeUpdateChunkSize` defined in the process engine configuration." + } + } + }, + { + "$ref": "#/components/schemas/AbstractSetRemovalTimeDto" + } + ] + }, + "SetRetriesForExternalTasksDto": { + "type": "object", + "properties": { + "retries": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of retries to set for the external task. Must be \u003e\u003d 0. If this is 0, an incident is created\nand the task cannot be fetched anymore unless the retries are increased again. Can not be null." + }, + "externalTaskIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The ids of the external tasks to set the number of retries for." + }, + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The ids of process instances containing the tasks to set the number of retries for." + }, + "externalTaskQuery": { + "$ref": "#/components/schemas/ExternalTaskQueryDto" + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + } + } + }, + "SetVariablesAsyncDto": { + "type": "object", + "properties": { + "processInstanceIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of process instance ids that define a group of process instances\nto which the operation will set variables.\n\nPlease note that if `processInstanceIds`, `processInstanceQuery` and `historicProcessInstanceQuery`\nare defined, the resulting operation will be performed on the union of these sets." + }, + "processInstanceQuery": { + "$ref": "#/components/schemas/ProcessInstanceQueryDto" + }, + "historicProcessInstanceQuery": { + "$ref": "#/components/schemas/HistoricProcessInstanceQueryDto" + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A variables the operation will set in the root scope of the process instances." + } + } + }, + "SignalDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the signal to deliver.\n\n**Note**: This property is mandatory." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Optionally specifies a single execution which is notified by the signal.\n\n**Note**: If no execution id is defined the signal is broadcasted to all subscribed\nhandlers. " + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs. Each key is a variable name and\neach value a JSON variable value object." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "Specifies a tenant to deliver the signal. The signal can only be received on\nexecutions or process definitions which belongs to the given tenant.\n\n**Note**: Cannot be used in combination with executionId." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "description": "If true the signal can only be received on executions or process definitions which\nbelongs to no tenant. Value may not be false as this is the default behavior.\n\n**Note**: Cannot be used in combination with `executionId`." + } + } + }, + "SortTaskQueryParametersDto": { + "type": "object", + "description": "Mandatory when `sortBy` is one of the following values: `processVariable`, `executionVariable`,\n`taskVariable`, `caseExecutionVariable` or `caseInstanceVariable`. Must be a JSON object with the properties\n`variable` and `type` where `variable` is a variable name and `type` is the name of a variable value type.", + "properties": { + "variable": { + "type": "string", + "nullable": true, + "description": "The name of the variable to sort by." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The name of the type of the variable value." + } + } + }, + "StartProcessInstanceDto": { + "type": "object", + "properties": { + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key of the process instance." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "" + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The case instance id the process instance is to be initialized with." + }, + "startInstructions": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProcessInstanceModificationInstructionDto" + }, + "description": "**Optional**. A JSON array of instructions that specify which activities to start the process instance at.\nIf this property is omitted, the process instance starts at its default blank start event." + }, + "skipCustomListeners": { + "type": "boolean", + "nullable": true, + "description": "Skip execution listener invocation for activities that are started or ended as part of this request.\n**Note**: This option is currently only respected when start instructions are submitted\nvia the `startInstructions` property." + }, + "skipIoMappings": { + "type": "boolean", + "nullable": true, + "description": "Skip execution of\n[input/output variable mappings](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables/#input-output-variable-mapping)\nfor activities that are started or ended as part of this request.\n**Note**: This option is currently only respected when start instructions are submitted\nvia the `startInstructions` property." + }, + "withVariablesInReturn": { + "type": "boolean", + "nullable": true, + "description": "Indicates if the variables, which was used by the process instance during execution, should be returned.\nDefault value: `false`" + } + } + }, + "StartProcessInstanceFormDto": { + "type": "object", + "properties": { + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "" + }, + "businessKey": { + "type": "string", + "nullable": true, + "description": "The business key the process instance is to be initialized with.\nThe business key uniquely identifies the process instance in the context of the given process definition." + } + } + }, + "SuspensionStateDto": { + "type": "object", + "properties": { + "suspended": { + "type": "boolean", + "nullable": true, + "description": "A Boolean value which indicates whether to activate or suspend a given instance \n(e.g. process instance, job, job definition, or batch). When the value is set to true, \nthe given instance will be suspended and when the value is set to false, \nthe given instance will be activated." + } + } + }, + "TaskBpmnErrorDto": { + "type": "object", + "properties": { + "errorCode": { + "type": "string", + "nullable": true, + "description": "An error code that indicates the predefined error. It is used to identify the BPMN\nerror handler." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message that describes the error." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs." + } + } + }, + "TaskCountByCandidateGroupResultDto": { + "type": "object", + "properties": { + "groupName": { + "type": "string", + "nullable": true, + "description": "The name of the candidate group. If there are tasks without a group name, the value will be `null`" + }, + "taskCount": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The number of tasks which have the group name as candidate group." + } + } + }, + "TaskDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The task id." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The task name." + }, + "assignee": { + "type": "string", + "nullable": true, + "description": "The assignee\u0027s id." + }, + "owner": { + "type": "string", + "nullable": true, + "description": "The owner\u0027s id." + }, + "created": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date the task was created on.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "lastUpdated": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date the task was last updated. Every action that fires a [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) will update this property.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "due": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The task\u0027s due date.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "followUp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The follow-up date for the task.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "delegationState": { + "type": "string", + "nullable": true, + "enum": [ + "PENDING", + "RESOLVED" + ], + "description": "The task\u0027s delegation state. Possible values are `PENDING` and `RESOLVED`." + }, + "description": { + "type": "string", + "nullable": true, + "description": "The task\u0027s description." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution the task belongs to." + }, + "parentTaskId": { + "type": "string", + "nullable": true, + "description": "The id the parent task, if this task is a subtask." + }, + "priority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "The task\u0027s priority." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition the task belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance the task belongs to." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "The id of the case execution the task belongs to." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the case definition the task belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance the task belongs to." + }, + "taskDefinitionKey": { + "type": "string", + "nullable": true, + "description": "The task\u0027s key." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "description": "Whether the task belongs to a process instance that is suspended." + }, + "formKey": { + "type": "string", + "nullable": true, + "description": "If not `null`, the form key for the task." + }, + "camundaFormRef": { + "$ref": "#/components/schemas/CamundaFormRef" + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the tenant id of the task." + } + } + }, + "TaskEscalationDto": { + "type": "object", + "properties": { + "escalationCode": { + "type": "string", + "nullable": true, + "description": "An escalation code that indicates the predefined escalation. It is used to identify\nthe BPMN escalation handler." + }, + "variables": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/VariableValueDto" + }, + "description": "A JSON object containing variable key-value pairs." + } + } + }, + "TaskQueryDto": { + "type": "object", + "description": "A Task query which defines a group of Tasks.", + "properties": { + "taskId": { + "type": "string", + "nullable": true, + "description": "Restrict to task with the given id." + }, + "taskIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks with any of the given ids." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to process instances with the given id." + }, + "processInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with the given ids." + }, + "processInstanceBusinessKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to process instances with the given business key." + }, + "processInstanceBusinessKeyExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to process instances with the given business key which \nis described by an expression. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + "processInstanceBusinessKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that belong to process instances with one of the give business keys. \nThe keys need to be in a comma-separated list." + }, + "processInstanceBusinessKeyLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring." + }, + "processInstanceBusinessKeyLikeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a process instance business key that has the parameter \nvalue as a substring and is described by an expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a process definition with the given id." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a process definition with the given key." + }, + "processDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that belong to a process definition with one of the given keys. The \nkeys need to be in a comma-separated list." + }, + "processDefinitionName": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a process definition with the given name." + }, + "processDefinitionNameLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a process definition name that has the parameter value as \na substring." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to an execution with the given id." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to case instances with the given id." + }, + "caseInstanceBusinessKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to case instances with the given business key." + }, + "caseInstanceBusinessKeyLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a case instance business key that has the parameter value \nas a substring." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case definition with the given id." + }, + "caseDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case definition with the given key." + }, + "caseDefinitionName": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case definition with the given name." + }, + "caseDefinitionNameLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a case definition name that has the parameter value as a \nsubstring." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that belong to a case execution with the given id." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated activity \ninstance ids." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include tasks which belong to one of the passed and comma-separated \ntenant ids." + }, + "withoutTenantId": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which belong to no tenant. Value may only be `true`, \nas `false` is the default behavior." + }, + "assignee": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the given user is assigned to." + }, + "assigneeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the user described by the given expression is assigned to. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "assigneeLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have an assignee that has the parameter \nvalue as a substring." + }, + "assigneeLikeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have an assignee that has the parameter value described by the \ngiven expression as a substring. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "assigneeIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include tasks which are assigned to one of the passed and comma-separated user ids." + }, + "assigneeNotIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include tasks which are not assigned to one of the passed and comma-separated user ids." + }, + "owner": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the given user owns." + }, + "ownerExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that the user described by the given expression owns. See the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "candidateGroup": { + "type": "string", + "nullable": true, + "description": "Only include tasks that are offered to the given group." + }, + "candidateGroupLike": { + "type": "string", + "nullable": true, + "description": "Only include tasks that are offered to groups that have the parameter value as a substring." + }, + "candidateGroupExpression": { + "type": "string", + "nullable": true, + "description": "Only include tasks that are offered to the group described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "candidateUser": { + "type": "string", + "nullable": true, + "description": "Only include tasks that are offered to the given user or to one of his groups." + }, + "candidateUserExpression": { + "type": "string", + "nullable": true, + "description": "Only include tasks that are offered to the user described by the given expression. \nSee the \n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions) \nfor more information on available functions." + }, + "includeAssignedTasks": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Also include tasks that are assigned to users in candidate queries. Default is to only \ninclude tasks that are not assigned to any user if you query by candidate user or\ngroup(s)." + }, + "involvedUser": { + "type": "string", + "nullable": true, + "description": "Only include tasks that the given user is involved in. A user is involved in a task if \nan identity link exists between task and user (e.g., the user is the assignee)." + }, + "involvedUserExpression": { + "type": "string", + "nullable": true, + "description": "Only include tasks that the user described by the given expression is involved in.\nA user is involved in a task if an identity link exists between task and user\n(e.g., the user is the assignee). See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions." + }, + "assigned": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "If set to `true`, restricts the query to all tasks that are assigned." + }, + "unassigned": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "If set to `true`, restricts the query to all tasks that are unassigned." + }, + "taskDefinitionKey": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given key." + }, + "taskDefinitionKeyIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that have one of the given keys. The keys need to be in a comma-separated list." + }, + "taskDefinitionKeyLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a key that has the parameter value as a substring." + }, + "name": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given name." + }, + "nameNotEqual": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that do not have the given name." + }, + "nameLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a name with the given parameter value as substring." + }, + "nameNotLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that do not have a name with the given parameter\nvalue as substring." + }, + "description": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have the given description." + }, + "descriptionLike": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a description that has the parameter\nvalue as a substring." + }, + "priority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Restrict to tasks that have the given priority." + }, + "maxPriority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Restrict to tasks that have a lower or equal priority." + }, + "minPriority": { + "type": "integer", + "format": "int32", + "nullable": true, + "description": "Restrict to tasks that have a higher or equal priority." + }, + "dueDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have the format\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.546+0200`." + }, + "dueDateExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are due on the date described by the given expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "dueAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.435+0200`." + }, + "dueAfterExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are due after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "dueBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that are due before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.243+0200`." + }, + "dueBeforeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are due before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "withoutDueDate": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which have no due date. Value may only be `true`, \nas `false` is the default behavior." + }, + "followUpDate": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have a followUp date on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date\nmust have the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.342+0200`." + }, + "followUpDateExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a followUp date on the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "followUpAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have a followUp date after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.542+0200`." + }, + "followUpAfterExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a followUp date after the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "followUpBefore": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a followUp date before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.234+0200`." + }, + "followUpBeforeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have a followUp date before the date described by the given\nexpression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "followUpBeforeOrNotExistent": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that have no followUp date or a followUp date before the given date.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.432+0200`. The typical use case\nis to query all `active` tasks for a user for a given date." + }, + "followUpBeforeOrNotExistentExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that have no followUp date or a followUp date before the date\ndescribed by the given expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "createdOn": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were created on the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must have\nthe format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.324+0200`." + }, + "createdOnExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that were created on the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "createdAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were created after the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must\nhave the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.342+0200`." + }, + "createdAfterExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that were created after the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "createdBefore": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were created before the given date. By\n[default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must\nhave the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + "createdBeforeExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that were created before the date described by the given expression.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "updatedAfter": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Restrict to tasks that were updated after the given date. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nBy [default](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/), the date must\nhave the format `yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.332+0200`." + }, + "updatedAfterExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that were updated after the date described by the given expression. Every action that fires \na [task update event](https://docs.camunda.org/manual/7.22/user-guide/process-engine/delegation-code/#task-listener-event-lifecycle) is considered as updating the task.\nSee the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to a\n`java.util.Date` or `org.joda.time.DateTime` object." + }, + "delegationState": { + "type": "string", + "nullable": true, + "enum": [ + "PENDING", + "RESOLVED" + ], + "description": "Restrict to tasks that are in the given delegation state. Valid values are\n`PENDING` and `RESOLVED`." + }, + "candidateGroups": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Restrict to tasks that are offered to any of the given candidate groups. Takes a\ncomma-separated list of group names, so for example\n`developers,support,sales`." + }, + "candidateGroupsExpression": { + "type": "string", + "nullable": true, + "description": "Restrict to tasks that are offered to any of the candidate groups described by the\ngiven expression. See the\n[user guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/expression-language/#internal-context-functions)\nfor more information on available functions. The expression must evaluate to\n`java.util.List` of Strings." + }, + "withCandidateGroups": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which have a candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + "withoutCandidateGroups": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which have no candidate group. Value may only be `true`,\nas `false` is the default behavior." + }, + "withCandidateUsers": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which have a candidate user. Value may only be `true`,\nas `false` is the default behavior." + }, + "withoutCandidateUsers": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include tasks which have no candidate users. Value may only be `true`,\nas `false` is the default behavior." + }, + "active": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include active tasks. Value may only be `true`, as `false`\nis the default behavior." + }, + "suspended": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Only include suspended tasks. Value may only be `true`, as\n`false` is the default behavior." + }, + "taskVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "A JSON array to only include tasks that have variables with certain values. The\narray consists of JSON objects with three properties `name`, `operator` and `value`.\n`name` is the variable name, `operator` is the comparison operator to be used and\n`value` the variable value. `value` may be of type `String`, `Number` or `Boolean`.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + "processVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "A JSON array to only include tasks that belong to a process instance with variables\nwith certain values. The array consists of JSON objects with three properties\n`name`, `operator` and `value`. `name` is the variable name, `operator` is the\ncomparison operator to be used and `value` the variable value. `value` may be of\ntype `String`, `Number` or `Boolean`.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`;\n`notLike`.\n`key` and `value` may not contain underscore or comma characters." + }, + "caseInstanceVariables": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "A JSON array to only include tasks that belong to a case instance with variables\nwith certain values. The array consists of JSON objects with three properties\n`name`, `operator` and `value`. `name` is the variable name, `operator` is the\ncomparison operator to be used and `value` the variable value. `value` may be of\ntype `String`, `Number` or `Boolean`.\n\nValid `operator` values are:\n`eq` - equal to;\n`neq` - not equal to;\n`gt` - greater than;\n`gteq` - greater than or equal to;\n`lt` - lower than;\n`lteq` - lower than or equal to;\n`like`.\n`key` and `value` may not contain underscore or comma characters." + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Match all variable names in this query case-insensitively. If set\n`variableName` and `variablename` are treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "Match all variable values in this query case-insensitively. If set\n`variableValue` and `variablevalue` are treated as equal." + }, + "parentTaskId": { + "type": "string", + "nullable": true, + "description": "Restrict query to all tasks that are sub tasks of the given task. Takes a task id." + }, + "orQueries": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/TaskQueryDto" + }, + "description": "A JSON array of nested task queries with OR semantics. A task matches a nested query if it fulfills\n*at least one* of the query\u0027s predicates. With multiple nested queries, a task must fulfill at least one predicate of *each* query ([Conjunctive Normal Form](https://en.wikipedia.org/wiki/Conjunctive_normal_form)).\n\nAll task query properties can be used except for: `sorting`, `withCandidateGroups`,\n`withoutCandidateGroups`, `withCandidateUsers`, `withoutCandidateUsers`\n\nSee the [User guide](https://docs.camunda.org/manual/7.22/user-guide/process-engine/process-engine-api/#or-queries)\nfor more information about OR queries." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "Apply sorting of the result", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "instanceId", + "caseInstanceId", + "dueDate", + "executionId", + "caseExecutionId", + "assignee", + "created", + "lastUpdated", + "followUpDate", + "description", + "id", + "name", + "nameCaseInsensitive", + "priority", + "processVariable", + "executionVariable", + "taskVariable", + "caseExecutionVariable", + "caseInstanceVariable" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + }, + "parameters": { + "$ref": "#/components/schemas/SortTaskQueryParametersDto" + } + } + } + } + } + }, + "TaskWithAttachmentAndCommentDto": { + "allOf": [ + { + "type": "object", + "properties": { + "attachment": { + "type": "boolean", + "nullable": true, + "description": "Specifies if an attachment exists for the task." + }, + "comment": { + "type": "boolean", + "nullable": true, + "description": "Specifies if an comment exists for the task." + } + } + }, + { + "$ref": "#/components/schemas/TaskDto" + } + ] + }, + "TelemetryConfigurationDto": { + "type": "object", + "properties": { + "enableTelemetry": { + "type": "boolean", + "nullable": true, + "description": "Specifies if the telemetry data should be sent or not." + } + } + }, + "TelemetryCountDto": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int64", + "nullable": true, + "description": "An integer value representing the count for this metric." + } + } + }, + "TelemetryDataDto": { + "type": "object", + "properties": { + "installation": { + "type": "string", + "nullable": true, + "description": "An id which is unique for each installation of Camunda. It is stored once per database so all\nengines connected to the same database will have the same installation ID.\nThe ID is used to identify a single installation of Camunda Platform." + }, + "product": { + "$ref": "#/components/schemas/TelemetryProductDto" + } + } + }, + "TelemetryInternalsDto": { + "type": "object", + "properties": { + "database": { + "$ref": "#/components/schemas/AbstractVendorVersionInformationDto" + }, + "application-server": { + "$ref": "#/components/schemas/AbstractVendorVersionInformationDto" + }, + "license-key": { + "$ref": "#/components/schemas/TelemetryLicenseKeyDto" + }, + "camunda-integration": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "List of Camunda integrations used (e.g., Camunda Spring Boot Starter, Camunda Run, WildFly/JBoss subsystem, Camunda EJB)." + }, + "commands": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TelemetryCountDto" + }, + "description": "The count of executed commands after the last retrieved data." + }, + "metrics": { + "type": "object", + "nullable": true, + "additionalProperties": { + "$ref": "#/components/schemas/TelemetryCountDto" + }, + "description": "The collected metrics are the number of root process instance executions started, the number of activity instances started or also known as flow node instances, and the number of executed decision instances and elements." + }, + "webapps": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "The webapps enabled in this installation of Camunda." + }, + "jdk": { + "$ref": "#/components/schemas/AbstractVendorVersionInformationDto" + }, + "data-collection-start-date": { + "type": "string", + "format": "date-time", + "description": "The date when the engine started to collect dynamic data, such as command executions and metrics. If telemetry sending is enabled, dynamic data resets on sending the data to Camunda.\nDynamic data and the date returned by this method are reset in three cases: engine startup, after engine start when sending telemetry data to Camunda is enabled via API, after sending telemetry data to Camunda (only when this was enabled)\nThe date is in the format \u003ccode\u003eYYYY-MM-DD\u0027T\u0027HH:mm:ss.SSSZ\u003c/code\u003e." + } + } + }, + "TelemetryLicenseKeyDto": { + "type": "object", + "properties": { + "customer": { + "type": "string", + "nullable": true, + "description": "The name of the customer the license was issued for." + }, + "type": { + "type": "string", + "nullable": true, + "description": "The license type." + }, + "valid-until": { + "type": "string", + "format": "date", + "nullable": true, + "description": "The expiration date of the license." + }, + "unlimited": { + "type": "boolean", + "nullable": true, + "description": "Flag that indicates if the license is unlimited." + }, + "features": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "A map of features included in the license." + }, + "raw": { + "type": "string", + "nullable": true, + "description": "The raw license information." + } + } + }, + "TelemetryProductDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "The name of the product (i.e., Camunda BPM Runtime)." + }, + "version": { + "type": "string", + "nullable": true, + "description": "The version of the process engine (i.e., 7.X.Y)." + }, + "edition": { + "type": "string", + "nullable": true, + "description": "The edition of the product (i.e., either community or enterprise)." + }, + "internals": { + "$ref": "#/components/schemas/TelemetryInternalsDto" + } + } + }, + "TenantDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the tenant." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the tenant." + } + } + }, + "TransitionInstanceDto": { + "type": "object", + "description": "A JSON object corresponding to the Activity Instance tree of the given process instance.", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the transition instance." + }, + "parentActivityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the parent activity instance, for example a sub process instance." + }, + "activityId": { + "type": "string", + "nullable": true, + "description": "The id of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job)" + }, + "activityName": { + "type": "string", + "nullable": true, + "description": "The name of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job)" + }, + "activityType": { + "type": "string", + "nullable": true, + "description": "The type of the activity that this instance enters (asyncBefore job) or leaves (asyncAfter job)" + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance this instance is part of." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The execution id." + }, + "incidentIds": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of incident ids." + }, + "incidents": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ActivityInstanceIncidentDto" + }, + "description": "A list of JSON objects containing incident specific properties:\n* `id`: the id of the incident\n* `activityId`: the activity id in which the incident occurred" + } + } + }, + "TriggerVariableValueDto": { + "allOf": [ + { + "type": "object", + "properties": { + "local": { + "type": "boolean", + "nullable": true, + "description": "Indicates whether the variable should be a local variable or not.\nIf set to true, the variable becomes a local variable of the execution\nentering the target activity." + } + } + }, + { + "$ref": "#/components/schemas/VariableValueDto" + } + ] + }, + "UserCredentialsDto": { + "type": "object", + "properties": { + "password": { + "type": "string", + "nullable": true, + "description": "The users new password." + }, + "authenticatedUserPassword": { + "type": "string", + "nullable": true, + "description": "The password of the authenticated user who changes the password of the user\n(i.e., the user with passed id as path parameter)." + } + } + }, + "UserDto": { + "type": "object", + "properties": { + "profile": { + "$ref": "#/components/schemas/UserProfileDto" + }, + "credentials": { + "$ref": "#/components/schemas/UserCredentialsDto" + } + } + }, + "UserIdDto": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "nullable": true, + "description": "The id of the user that the current action refers to." + } + } + }, + "UserOperationLogEntryDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The unique identifier of this log entry." + }, + "userId": { + "type": "string", + "nullable": true, + "description": "The user who performed this operation." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Timestamp of this operation." + }, + "operationId": { + "type": "string", + "nullable": true, + "description": "The unique identifier of this operation. A composite operation that changes\nmultiple properties has a common `operationId`." + }, + "operationType": { + "type": "string", + "nullable": true, + "description": "The type of this operation, e.g., `Assign`, `Claim` and so on." + }, + "entityType": { + "type": "string", + "nullable": true, + "description": "The type of the entity on which this operation was executed, e.g., `Task` or\n`Attachment`." + }, + "category": { + "type": "string", + "nullable": true, + "description": "The name of the category this operation was associated with, e.g., `TaskWorker` or\n`Admin`." + }, + "annotation": { + "type": "string", + "nullable": true, + "description": "An arbitrary annotation set by a user for auditing reasons." + }, + "property": { + "type": "string", + "nullable": true, + "description": "The property changed by this operation." + }, + "orgValue": { + "type": "string", + "nullable": true, + "description": "The original value of the changed property." + }, + "newValue": { + "type": "string", + "nullable": true, + "description": "The new value of the changed property." + }, + "deploymentId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this\ndeployment." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this process\ndefinition." + }, + "processDefinitionKey": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to process\ndefinitions with this key." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this process\ninstance." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this\nexecution." + }, + "caseDefinitionId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this case\ndefinition." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this case\ninstance." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this case\nexecution." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this task." + }, + "externalTaskId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this external task." + }, + "batchId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this batch." + }, + "jobId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this job." + }, + "jobDefinitionId": { + "type": "string", + "nullable": true, + "description": "If not `null`, the operation is restricted to entities in relation to this job\ndefinition." + }, + "removalTime": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The time after which the entry should be removed by the History Cleanup job.\n[Default format](https://docs.camunda.org/manual/7.22/reference/rest/overview/date-format/)\n`yyyy-MM-dd\u0027T\u0027HH:mm:ss.SSSZ`." + }, + "rootProcessInstanceId": { + "type": "string", + "nullable": true, + "description": "The process instance id of the root process instance that initiated the process\ncontaining this entry." + } + } + }, + "UserProfileDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the user." + }, + "firstName": { + "type": "string", + "nullable": true, + "description": "The first name of the user." + }, + "lastName": { + "type": "string", + "nullable": true, + "description": "The first name of the user." + }, + "email": { + "type": "string", + "nullable": true, + "description": "The email of the user." + } + } + }, + "VariableInstanceDto": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true, + "description": "The id of the variable instance." + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the variable instance." + }, + "processDefinitionId": { + "type": "string", + "nullable": true, + "description": "The id of the process definition that this variable instance belongs to." + }, + "processInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the process instance that this variable instance belongs to." + }, + "executionId": { + "type": "string", + "nullable": true, + "description": "The id of the execution that this variable instance belongs to." + }, + "caseInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the case instance that this variable instance belongs to." + }, + "caseExecutionId": { + "type": "string", + "nullable": true, + "description": "The id of the case execution that this variable instance belongs to." + }, + "taskId": { + "type": "string", + "nullable": true, + "description": "The id of the task that this variable instance belongs to." + }, + "batchId": { + "type": "string", + "nullable": true, + "description": "The id of the batch that this variable instance belongs to.\u003c" + }, + "activityInstanceId": { + "type": "string", + "nullable": true, + "description": "The id of the activity instance that this variable instance belongs to." + }, + "tenantId": { + "type": "string", + "nullable": true, + "description": "The id of the tenant that this variable instance belongs to." + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message in case a Java Serialized Object could not be de-serialized." + } + } + }, + { + "$ref": "#/components/schemas/VariableValueDto" + } + ] + }, + "VariableInstanceQueryDto": { + "type": "object", + "description": "A variable instance query which defines a list of variable instances", + "properties": { + "variableName": { + "type": "string", + "nullable": true, + "description": "Filter by variable instance name." + }, + "variableNameLike": { + "type": "string", + "nullable": true, + "description": "Filter by the variable instance name. The parameter can include the wildcard `%` to\nexpress like-strategy such as: starts with (`%`name), ends with (name`%`) or\ncontains (`%`name`%`)." + }, + "processInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed \nprocess instance ids." + }, + "executionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed \nexecution ids." + }, + "caseInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed case instance ids." + }, + "caseExecutionIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed case execution ids." + }, + "taskIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed task\nids." + }, + "batchIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed \nbatch ids." + }, + "activityInstanceIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed \nactivity instance ids." + }, + "tenantIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of the passed \ntenant ids." + }, + "variableValues": { + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/VariableQueryParameterDto" + }, + "description": "An array to only include variable instances that have the certain values.\nThe array consists of objects with the three properties `name`, `operator` and `value`. `name (String)` is the\nvariable name, `operator (String)` is the comparison operator to be used and `value` the variable value.\n`value` may be `String`, `Number` or `Boolean`.\n\nValid operator values are: `eq` - equal to; `neq` - not equal to; `gt` - greater than; `gteq` - greater\nthan or equal to; `lt` - lower than; `lteq` - lower than or equal to; `like`" + }, + "variableNamesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable names provided in `variableValues` case-insensitively. If set to `true`\n**variableName** and **variablename** are treated as equal." + }, + "variableValuesIgnoreCase": { + "type": "boolean", + "nullable": true, + "description": "Match all variable values provided in `variableValues` case-insensitively. If set to\n`true` **variableValue** and **variablevalue** are treated as equal." + }, + "variableScopeIdIn": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "Only include variable instances which belong to one of passed scope ids." + }, + "sorting": { + "type": "array", + "nullable": true, + "description": "An array of criteria to sort the result by. Each element of the array is an object that specifies one ordering.\n The position in the array identifies the rank of an ordering, i.e., whether it is primary, secondary, etc.\n Sorting has no effect for `count` endpoints", + "items": { + "type": "object", + "properties": { + "sortBy": { + "type": "string", + "nullable": true, + "enum": [ + "variableName", + "variableType", + "activityInstanceId", + "tenantId" + ], + "description": "Sort the results lexicographically by a given criterion.\nMust be used in conjunction with the sortOrder parameter." + }, + "sortOrder": { + "type": "string", + "nullable": true, + "enum": [ + "asc", + "desc" + ], + "description": "Sort the results in a given order. Values may be `asc` for ascending order or `desc` for\ndescending order. Must be used in conjunction with the sortBy parameter." + } + } + } + } + } + }, + "VariableQueryParameterDto": { + "allOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "Variable name" + } + } + }, + { + "$ref": "#/components/schemas/ConditionQueryParameterDto" + } + ] + }, + "VariableValueDto": { + "type": "object", + "properties": { + "value": { + "$ref": "#/components/schemas/AnyValue" + }, + "type": { + "type": "string", + "nullable": true, + "description": "The value type of the variable." + }, + "valueInfo": { + "type": "object", + "additionalProperties": true, + "description": "A JSON object containing additional, value-type-dependent properties.\nFor serialized variables of type Object, the following properties can be provided:\n\n* `objectTypeName`: A string representation of the object\u0027s type name.\n* `serializationDataFormat`: The serialization format used to store the variable.\n\nFor serialized variables of type File, the following properties can be provided:\n\n* `filename`: The name of the file. This is not the variable name but the name that will be used when downloading the file again.\n* `mimetype`: The MIME type of the file that is being uploaded.\n* `encoding`: The encoding of the file that is being uploaded.\n\nThe following property can be provided for all value types:\n\n* `transient`: Indicates whether the variable should be transient or\nnot. See [documentation](https://docs.camunda.org/manual/7.22/user-guide/process-engine/variables#transient-variables) for more informations.\n(Not applicable for `decision-definition`, ` /process-instance/variables-async`, and `/migration/executeAsync` endpoints)" + } + } + }, + "VersionDto": { + "type": "object", + "properties": { + "version": { + "type": "string", + "nullable": true, + "description": "The version of the Rest API." + } + } + } + } + } +} diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.3.json b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.3.json new file mode 100644 index 0000000..0fd2077 --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.0.3.json @@ -0,0 +1,167 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Simple API overview", + "version": "2.0.0" + }, + "paths": { + "/": { + "get": { + "operationId": "listVersionsv2", + "summary": "List API versions", + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "versions": [ + { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + } + ] + }, + { + "status": "EXPERIMENTAL", + "updated": "2013-07-23T11:33:21Z", + "id": "v3.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v3/", + "rel": "self" + } + ] + } + ] + } + } + } + } + } + }, + "300": { + "description": "300 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": "{\n \"versions\": [\n {\n \"status\": \"CURRENT\",\n \"updated\": \"2011-01-21T11:33:21Z\",\n \"id\": \"v2.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v2/\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"status\": \"EXPERIMENTAL\",\n \"updated\": \"2013-07-23T11:33:21Z\",\n \"id\": \"v3.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v3/\",\n \"rel\": \"self\"\n }\n ]\n }\n ]\n}\n" + } + } + } + } + } + } + } + }, + "/v2": { + "get": { + "operationId": "getVersionDetailsv2", + "summary": "Show API version details", + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "version": { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "media-types": [ + { + "base": "application/xml", + "type": "application/vnd.openstack.compute+xml;version=2" + }, + { + "base": "application/json", + "type": "application/vnd.openstack.compute+json;version=2" + } + ], + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", + "type": "application/pdf", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + } + ] + } + } + } + } + } + } + }, + "203": { + "description": "203 response", + "content": { + "application/json": { + "examples": { + "foo": { + "value": { + "version": { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "media-types": [ + { + "base": "application/xml", + "type": "application/vnd.openstack.compute+xml;version=2" + }, + { + "base": "application/json", + "type": "application/vnd.openstack.compute+json;version=2" + } + ], + "id": "v2.0", + "links": [ + { + "href": "http://23.253.228.211:8774/v2/", + "rel": "self" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", + "type": "application/pdf", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + } + ] + } + } + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.1.0.json b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.1.0.json new file mode 100644 index 0000000..6d6ff03 --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/OpenApis/openapi-3.1.0.json @@ -0,0 +1,261 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Tic Tac Toe", + "description": "This API allows writing down marks on a Tic Tac Toe board\nand requesting the state of the board or of individual squares.\n", + "version": "1.0.0" + }, + "tags": [ + { + "name": "Gameplay" + } + ], + "paths": { + "/board": { + "get": { + "summary": "Get the whole board", + "description": "Retrieves the current state of the board and the winner.", + "tags": [ "Gameplay" ], + "operationId": "get-board", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/status" + } + } + } + } + }, + "security": [ + { + "defaultApiKey": [] + }, + { + "app2AppOauth": [ "board:read" ] + } + ] + } + }, + "/board/{row}/{column}": { + "parameters": [ + { + "$ref": "#/components/parameters/rowParam" + }, + { + "$ref": "#/components/parameters/columnParam" + } + ], + "get": { + "summary": "Get a single board square", + "description": "Retrieves the requested square.", + "tags": [ "Gameplay" ], + "operationId": "get-square", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/mark" + } + } + } + }, + "400": { + "description": "The provided parameters are incorrect", + "content": { + "text/html": { + "schema": { + "$ref": "#/components/schemas/errorMessage" + }, + "example": "Illegal coordinates" + } + } + } + }, + "security": [ + { + "bearerHttpAuthentication": [] + }, + { + "user2AppOauth": [ "board:read" ] + } + ] + }, + "put": { + "summary": "Set a single board square", + "description": "Places a mark on the board and retrieves the whole board and the winner (if any).", + "tags": [ "Gameplay" ], + "operationId": "put-square", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/mark" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/status" + } + } + } + }, + "400": { + "description": "The provided parameters are incorrect", + "content": { + "text/html": { + "schema": { + "$ref": "#/components/schemas/errorMessage" + }, + "examples": { + "illegalCoordinates": { + "value": "Illegal coordinates." + }, + "notEmpty": { + "value": "Square is not empty." + }, + "invalidMark": { + "value": "Invalid Mark (X or O)." + } + } + } + } + } + }, + "security": [ + { + "bearerHttpAuthentication": [] + }, + { + "user2AppOauth": [ "board:write" ] + } + ] + } + } + }, + "components": { + "parameters": { + "rowParam": { + "description": "Board row (vertical coordinate)", + "name": "row", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/coordinate" + } + }, + "columnParam": { + "description": "Board column (horizontal coordinate)", + "name": "column", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/coordinate" + } + } + }, + "schemas": { + "errorMessage": { + "type": "string", + "maxLength": 256, + "description": "A text message describing an error" + }, + "coordinate": { + "type": "integer", + "minimum": 1, + "maximum": 3, + "example": 1 + }, + "mark": { + "type": "string", + "enum": [ ".", "X", "O" ], + "description": "Possible values for a board square. `.` means empty square.", + "example": "." + }, + "board": { + "type": "array", + "maxItems": 3, + "minItems": 3, + "items": { + "type": "array", + "maxItems": 3, + "minItems": 3, + "items": { + "$ref": "#/components/schemas/mark" + } + } + }, + "winner": { + "type": "string", + "enum": [ ".", "X", "O" ], + "description": "Winner of the game. `.` means nobody has won yet.", + "example": "." + }, + "status": { + "type": "object", + "properties": { + "winner": { + "$ref": "#/components/schemas/winner" + }, + "board": { + "$ref": "#/components/schemas/board" + } + } + } + }, + "securitySchemes": { + "defaultApiKey": { + "description": "API key provided in console", + "type": "apiKey", + "name": "api-key", + "in": "header" + }, + "basicHttpAuthentication": { + "description": "Basic HTTP Authentication", + "type": "http", + "scheme": "Basic" + }, + "bearerHttpAuthentication": { + "description": "Bearer token using a JWT", + "type": "http", + "scheme": "Bearer", + "bearerFormat": "JWT" + }, + "app2AppOauth": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "https://learn.openapis.org/oauth/2.0/token", + "scopes": { + "board:read": "Read the board" + } + } + } + }, + "user2AppOauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://learn.openapis.org/oauth/2.0/auth", + "tokenUrl": "https://learn.openapis.org/oauth/2.0/token", + "scopes": { + "board:read": "Read the board", + "board:write": "Write to the board" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Converters/PascalCaseConverterTests.cs b/tests/OpenApi.Client.SourceGenerators.UnitTests/PascalCaseConverterTests.cs similarity index 94% rename from tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Converters/PascalCaseConverterTests.cs rename to tests/OpenApi.Client.SourceGenerators.UnitTests/PascalCaseConverterTests.cs index df04774..db3d6de 100644 --- a/tests/OpenApi.Client.SourceGenerators.Roslyn431.UnitTests/Converters/PascalCaseConverterTests.cs +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/PascalCaseConverterTests.cs @@ -5,7 +5,7 @@ using OpenApi.Client.SourceGenerators.Converters; -namespace OpenApi.Client.SourceGenerators.Roslyn431.UnitTests.Converters; +namespace OpenApi.Client.SourceGenerators.UnitTests; public sealed class PascalCaseConverterTests { diff --git a/tests/OpenApi.Client.SourceGenerators.UnitTests/SourceGeneratorTests.cs b/tests/OpenApi.Client.SourceGenerators.UnitTests/SourceGeneratorTests.cs new file mode 100644 index 0000000..d4671aa --- /dev/null +++ b/tests/OpenApi.Client.SourceGenerators.UnitTests/SourceGeneratorTests.cs @@ -0,0 +1,58 @@ +// This Source Code Form is subject to the terms of the MIT License. +// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. +// Copyright (C) Leszek Pomianowski and OpenAPI Client Contributors. +// All Rights Reserved. + +using System.Linq; +using OpenApi.Client.SourceGenerators.UnitTests.CodeAnalysis; + +namespace OpenApi.Client.SourceGenerators.UnitTests; + +public sealed class SourceGeneratorTests +{ + [Fact] + public void Initialize_ShouldGenerateAttribute() + { + GeneratorDriver driver = new OpenApiClientGenerator().CreateDriver(); + + GeneratorDriverRunResult result = driver.GetRunResult(); + + result.GeneratedTrees.Length.Should().BeGreaterThan(0); + result + .GeneratedTrees.First() + .Should() + .Satisfy(x => + { + x.FilePath.Should().Contain("OpenApiClientAttribute.g.cs"); + + string generatedSourceCode = x.GetText().ToString(); + + generatedSourceCode + .Should() + .Contain("internal sealed class OpenApiClientAttribute : global::System.Attribute"); + }); + } + + [Fact] + public void Initialize_ShouldGenerateSourceCode() + { + GeneratorDriver driver = new OpenApiClientGenerator().CreateDriver( + """ + using OpenApi.Client; + + namespace OpenApiClientUnitTest + { + [OpenApiClient("openapi-3.1.0")] + public partial class MyClient + { + } + } + """, + JsonAdditionalText.FromFile("OpenApis/openapi-3.1.0.json") + ); + + GeneratorDriverRunResult result = driver.GetRunResult(); + + var test = 1; + } +}